Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Trapping CGI Error

by clairudjinn (Beadle)
on Mar 19, 2003 at 20:13 UTC ( [id://244443]=note: print w/replies, xml ) Need Help??


in reply to Trapping CGI Error

Replies are listed 'Best First'.
Re: Re: Trapping CGI Error
by perrin (Chancellor) on Mar 19, 2003 at 20:23 UTC
    What you're describing is exactly the right way to handle errors that you want to trap and try to recover from. However, there is not much point in trapping errors that you can't recover from and don't want to send a specific messae for, like the database being unavailable or the disk being full. (You would want to log that the database was down, but you typically wouldn't want to tell the end user.) For those cases, letting the script die and setting a custom error page for 500 errors is the best approach.
Re: Re: Trapping CGI Error
by jasonk (Parson) on Mar 19, 2003 at 20:18 UTC

    Wrapping an eval around the entire application is a less-than-optimal solution.


    We're not surrounded, we're in a target-rich environment!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-18 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found