Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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>"; }

"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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2015-01-28 12:06 GMT
Find Nodes?
    Voting Booth?

    My top resolution in 2015 is:

    Results (214 votes), past polls