11-12-2014
Providing nothing else caught any exceptions inside it, yes.
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi i have small shell script as follows
cd /utilities/promoter/tmp
grep SENDREPLY $1 | grep 'zzzzz@zzz.com' | awk -F" -f1 > /tmp/$LOGNAME/$1.request
cd /tmp/$LOGNAME
grep -e "\.sql" -e "\.md" $1.request > upd_$1.txt
grep -v -e "\.sql" -e "\.md" $1.request > copy_$1.txt
... (1 Reply)
Discussion started by: zedex
1 Replies
2. UNIX for Dummies Questions & Answers
Hi
How can I test inside a shel script whether the last action was successful or not.
I have the following line which is executing inside a script
. ./runProcess.sh $i $var_num>> error.txt 2>&1
This is occuring in a loop. How can i test whether it was succes for last var_num or not. How... (2 Replies)
Discussion started by: Prashantckc
2 Replies
3. UNIX for Dummies Questions & Answers
Hello everybody,
Can anybody tell me how do we comfirm the execution of a scheduled job ?
In other words, how do I know whether my scheduled script is being executed or not ?
Thanks
Jitu JK (2 Replies)
Discussion started by: jitu.jk
2 Replies
4. Shell Programming and Scripting
Need to check whether the source file(FTP'ed file) is completly copied or not such that I can further action on the same. I have created the below script to achieve this by checking for every 10secs to whether file size is same or not but it may create a problem if the file transfer is slow and if... (4 Replies)
Discussion started by: palanisvr
4 Replies
5. Shell Programming and Scripting
Hi Experts,
I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task.
I am running below command to snmpwalk the router..
snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies
6. Shell Programming and Scripting
Hi All,
I have written a shell script that creates a backup of my MySQL database. The script performs the following functions:
Creates a Backup of the MySQL database
Compresses the Backup
Copies the Backup to a Remote Server
Send an E-Mail displaying the size of the Backup
Removes any... (6 Replies)
Discussion started by: SalientAnimal
6 Replies
7. Shell Programming and Scripting
below is the output xml string from some other command and i will be parsing it using awk
cat /tmp/alerts.xml
<Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies
8. Shell Programming and Scripting
Hello,
I have written a command n shell script :
srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f
If the above command executes successfully without error I need to echo
"Service relocated successfully
and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies
9. UNIX for Dummies Questions & Answers
All,
I have to copy huge file from one location to another using python . I want to make sure the execution of Copy command is successful and all the files are copied properly (there has not been any abrupt interruption to the copy process or error like no space available is encountered during... (2 Replies)
Discussion started by: IshuGupta
2 Replies
10. Red Hat
hi guys,
booting centos7 and use systemd execute system command ulimit -SHn 202400 is fail.i dont know what's reason.can you give me help.
------------------------------------------
set-ulimit.service
Description=test service
After=systemd-update-utmp-runlevel.service #the last... (1 Reply)
Discussion started by: shean
1 Replies
LEARN ABOUT DEBIAN
dancer::exception::base
Dancer::Exception::Base(3pm) User Contributed Perl Documentation Dancer::Exception::Base(3pm)
NAME
Dancer::Exception::Base - the base class of all Dancer exceptions
DESCRIPTION
Dancer::Exception::Base is the base class of all Dancer exception. All core exceptions, and all custom exception registered using
"Dancer::Exception::register_exception" inherits of "Dancer::Exception::Base".
METHODS
throw
Throws an exception. It's what "raise" (from Dancer::Exception) uses. Any arguments is set as raising parameters. You should not use this
method directly, but instead, use "raise" from Dancer::Exception.
Warning, if you want to rethrow an exception, use "rethrow".
rethrow
Re-throw the exception, without touching its parameters. Useful if you've caught and exception but don't want to handle it, and want to
rethrow it.
try { ... }
catch {
my ($e) = @_;
$e->does('InvalidLogin')
or $e->rethrow;
...
};
does
Given an exception type, returns true if the exception is of the same type.
try { raise InvalidLogin => 'foo'; }
catch {
my ($e) = @_;
$e->does('InvalidLogin') # true
...
};
It can receive more than one type, useful for composed exception, or checking multiple types at once. "does" performs a logical OR between
them:
try { raise InvalidPassword => 'foo'; }
catch {
my ($e) = @_;
$e->does('InvalidLogin', 'InvalidPassword') # true
...
};
get_composition
Returns the composed types of an exception. As every exception inherits of Dancer::Exception::Base, the returned list contains at least
'Base', and the exception class name.
Warning, the result is a list, so you should call this method in list context.
try { raise InvalidPassword => 'foo'; }
catch {
my ($e) = @_;
my @list = $e->get_composition()
# @list contains ( 'InvalidPassword', 'Base', ... )
};
message
Computes and returns the message associated to the exception. It'll apply the parameters that were set at throw time to the message pattern
of the exception.
STRINGIFICATION
string overloading
All Dancer exceptions properly stringify. When evaluated to a string, they return their message, concatenated with their stack trace (see
below).
cmp overloading
The "cmp" operator is also overloaded, thus all the string operations can be done on Dancer's exceptions, as they will all be based on the
overloaded "cmp" operator. Dancer exceptions wil be compared without their stacktraces.
STACKTRACE
Similarly to Carp, Dancer exceptions stringification appends a string stacktrace to the exception message.
The stacktrace can be a short one, or a long one. Actually the implementation internally uses Carp.
To enable long stack trace (for debugging purpose), you can use the global variable "Dancer::Exception::Verbose" (see below).
The short and long stacktrace snippets are stored within "$self-"{_shortmess}> and "$self-"{_longmess}>. Don't touch them or rely on them,
they are internals, and will change soon.
GLOBAL VARIABLE
$Dancer::Exception::Verbose
When set to 1, exceptions will stringify with a long stack trace. This variable is similar to $Carp::Verbose. I recommend you use it like
that:
local $Dancer::Exception::Verbose;
$Dancer::Exception::Verbose = 1;
All the Carp global variables can also be used to alter the stacktrace generation.
perl v5.14.2 2012-03-31 Dancer::Exception::Base(3pm)