Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

An easy-to-use signal handler

by Jeppe (Monk)
on Nov 12, 2002 at 16:20 UTC ( [id://212300]=note: print w/replies, xml ) Need Help??


in reply to How do I get a post mortem stack trace?

$SIG{__DIE__} = sub { my ( $path, $line, $subr ); my $i = 0; while ( $subr = (caller($i++))[3] ) { return if $subr eq '(eval)'; } warn "died at: ", join(' line ', (caller)[1,2]), "\n"; $i = 1; while ( ($path, $line) = (caller($i++))[1,2] ) { warn "caller: $path line $line\n"; } };
I am not sure if this runs on Win32.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://212300]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-19 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found