Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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 surveying the Monastery: (5)
As of 2015-11-28 01:43 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (737 votes), past polls