public
Last active

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#!/usr/bin/perl
 
use feature 'say';
use Try::Tiny;
 
use Exception::Class (
'MyException',
 
'AnotherException' => { isa => 'MyException' },
 
'YetAnotherException' => {
isa => 'AnotherException',
description => 'These exceptions are related to IPC'
},
);
 
try {
die YetAnotherException->new( "argh" );
}
catch {
say $_;
say "";
say $_->message;
say "";
say $_->description;
say "";
say $_->error, "\n", $_->trace->as_string, "\n";
say "";
say join ' ', $_->euid, $_->egid, $_->uid, $_->gid, $_->pid, $_->time;
 
exit;
};
 
__END__
 
argh
 
argh
 
These exceptions are related to IPC
 
argh
Trace begun at D:\traffics\ec\script.pl line 18
main::__ANON__[D:\traffics\ec\script.pl:19] at C:\Perl\site\lib\Try\Tiny.pm line 76
eval {...} at C:\Perl\site\lib\Try\Tiny.pm line 67
Try::Tiny::try('CODE(0x1ff890c)', 'Try::Tiny::Catch=REF(0x200a78c)') called at D:\traffics\ec\script.pl line 32
 
 
 
0 0 0 0 6156 1286543061

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.