Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Error handling - how much/where/how?

by thcsoft (Monk)
on Jun 13, 2005 at 01:36 UTC ( #466023=note: print w/replies, xml ) Need Help??


in reply to Error handling - how much/where/how?

in addition to what salva and Ultra stated:
- you might want to take a look at Carp.pm
- there's a CORE function named caller.
- you can install hooks for every signal, even $SIG{__DIE__}.

e.g.:
local $SIG{__DIE__} = sub { my $i = -1; while (my @c= caller(++$i)) { print " at $c[1] line $[2]\n"; } };

language is a virus from outer space.

Replies are listed 'Best First'.
Re^2: Error handling - how much/where/how? (a plug for Devel::SimpleTrace)
by grinder (Bishop) on Jun 14, 2005 at 07:50 UTC

    I used to hand-roll similar stuff, badly. These days I have learnt to become Lazy, and I now use Devel::SimpleTrace. That's usually good enough for me to figure out the course of events when Things Go Wrong.

    - another intruder with the mooring in the heart of the Perl

      another way is to use Carp::croak to report errors and then use...
      perl -MCarp=verbose foo.pl
      to get stack traces.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466023]
help
Chatterbox?
[thezip]: Howdy y'all. Is it safe to just delete StrawberryPerl-> cpan->build directories?
[1nickt]: karlgoethebier Thank you!! How could I not have ever heard of this musician?
[choroba]: thezip should be ok.
[thezip]: It seemed so, choroba, but I don't want to confuse anyone (especially myself!)
[choroba]: thezip unless something like this happens to you.
[thezip]: I don't intend on doing any offline development in the Czech Republic soon, so i think I'm safe!
[thezip]: :-)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-03-23 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (294 votes). Check out past polls.