Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Test mysql connection, and return nice message?

by liverpole (Monsignor)
on Mar 13, 2010 at 14:54 UTC ( #828447=note: print w/ replies, xml ) Need Help??


in reply to Test mysql connection, and return nice message?

Hi ultranerds,

Have you seen the section in CGI::Carp called DOING MORE THAN PRINTING A MESSAGE IN THE EVENT OF PERL ERRORS?  I think that may be what you want -- it explains how to write an error handler for your specific needs.

Instead of the clause:

|| push @errors, "Database connection not made: $DBI::errstr";
you can apparently setup your own error handler to which you could pass just the error message, and have it push the error onto your error stack.

Good luck!


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/


Comment on Re: Test mysql connection, and return nice message?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2015-07-31 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls