Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Printing DBI errors from a CGI script

by tradez (Pilgrim)
on Apr 18, 2002 at 20:01 UTC ( #160330=note: print w/ replies, xml ) Need Help??


in reply to Printing DBI errors from a CGI script

Well if you are going to want error reporting to the browser you are going to have a setup an error function and have the 'or' clause or the if(!dbh){} checking point to that. Something like this might work

sub errorHandling { my ($error) = @{{@_}}{qw/error}; print "<html> <head> <title> Error </title> </head> <body> You have the following error <br> $error<br> </body> </html>"; }


Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)


Comment on Re: Printing DBI errors from a CGI script
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2014-07-30 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (240 votes), past polls