in reply to Best Practices for Exception Handling
I've always used perl's EVAL command:
my $val;
eval {
my $val = $self->do_command();
};
warn " do_command failed with the following error \n\n@_" if ("@_" ne "");
- adam
eval {
my $val = $self->do_command();
};
warn " do_command failed with the following error \n\n@_" if ("@_" ne "");
- adam
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Best Practices for Exception Handling
by particle (Vicar) on Jan 29, 2003 at 01:13 UTC | |
by bart (Canon) on Jan 29, 2003 at 09:40 UTC | |
by theguvnor (Chaplain) on Jan 29, 2003 at 02:06 UTC | |
by demerphq (Chancellor) on Jan 29, 2003 at 17:06 UTC | |
Re: Re: Best Practices for Exception Handling
by theguvnor (Chaplain) on Jan 29, 2003 at 01:05 UTC |
In Section
Seekers of Perl Wisdom