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

Re: CGI Error Handling

by bmccoy (Beadle)
on Dec 10, 2001 at 16:56 UTC ( #130646=note: print w/ replies, xml ) Need Help??


in reply to CGI Error Handling

A lot depends on the error -- an application level error (bad user input, unavailable resource, etc) I usually handle with my own exception handling routines. Fatal exceptions I usually dump into the web server using somehting like CGI::Carp. It also lets you print error messages to the browser screen, but this shouldn't be done for a production, just as a debugging tool.

-- Brett

Go not to the Elves for counsel, for they will say both no and yes


Comment on Re: CGI Error Handling
Re: Re: CGI Error Handling
by uwevoelker (Pilgrim) on Dec 10, 2001 at 18:07 UTC
    I mean application level error. How does your own exception handling routine look like?
    I usually write a database-abstraction-layer (and plan to write a general modul for this purpose). I'm not sure how I should handle errors that occur in this layer. Should the script specify an error template and the database-layers shows this page if an error occurs? Or should the database-layer only return a false value and stores the errortext/-code in a datastructure? The script then can retrieve this errortext and prints the errortemplate.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-07-29 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls