Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Error Output

by kennethk (Abbot)
on Jan 21, 2009 at 20:56 UTC ( [id://737949]=note: print w/replies, xml ) Need Help??


in reply to Error Output

You can generate a fatal error with full stack trace with confess, and then have that message sent to browser using CGI::Carp qw(fatalstobrowser). It's all in CGI::Carp.

Replies are listed 'Best First'.
Re^2: Error Output
by geckosan (Sexton) on Jan 21, 2009 at 21:10 UTC
    ah you pointed me in the right direction. $SIG{ __DIE__ } = sub { confess( @_ ) }; with fatalstobrowser did the trick, thanks mighty monks. for some reason that particular combination was eluding me. o_o
Re^2: Error Output
by geckosan (Sexton) on Jan 21, 2009 at 21:06 UTC
    I'm not generating the error, it's coming up in the code.
      If your code is calling die, then $SIG{__DIE__}=\&{cluck @_}; along with CGI::Carp qw(fatalstobrowser) should do you.
        as you say kennethk, cheers mang.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2026-04-14 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.