- or download this
use Exception::Class (
'MyException',
...
alias => 'throw_fields',
},
);
- or download this
eval{ die { a=>b=>c=>d=>}; } or print %{ $@ };;
c d a b
- or download this
# catch
if ( $e = Exception::Class->caught('MyException') ) {
...
$e = Exception::Class->caught();
ref $e ? $e->rethrow : die $e;
}