in reply to Trapping errors with specificity
Update: So in your example, you could do something like:
eval { $code_ref->(); }; if ( my $e = $@ ) { if( UNIVERSAL::isa($e, 'Exception::Class') { # handle exception here } else { # parse string from die } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trapping errors with specificity
by diotalevi (Canon) on Aug 07, 2006 at 19:10 UTC |