Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: CGI::Application::Plugin::DBH connect error handling

by Anonyrnous Monk (Hermit)
on Feb 10, 2011 at 21:30 UTC ( #887537=note: print w/ replies, xml ) Need Help??

in reply to CGI::Application::Plugin::DBH connect error handling

In what way would you like to handle the error that the DB is down?

As for the exception you're currently getting as a result, what DBI connect attributes have you configured?  The following snippet

... # use the parameters the user supplied else { require DBI; $self->{__DBH}{$name} = DBI->connect(@{ $self->{__DBH_ +CONFIG}{$name} }); # }

apparently raises an exception, so my suspicion would be that you've somehow set RaiseError => 1.

Maybe you could force a stack trace to get more detailed info on what exactly is triggering the connect, so you know what to put eval {} around?

Comment on Re: CGI::Application::Plugin::DBH connect error handling
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2015-11-29 08:31 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 (749 votes), past polls