Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://160330]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2016-12-05 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (80 votes). Check out past polls.