Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://828447]
[marto]: Corion, yeah, why no new browser window opens is currently beyond my understanding
[marto]: thanks
[Corion]: marto: Maybe it opens offscreen? I wouldn't know an easy way to confirm that, except maybe closing the chromeless window and then looking whether iexplore.exe is still running

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2018-03-21 11:55 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.