Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Graceful handling of DBI connect errors'

by ColtsFoot (Chaplain)
on Nov 15, 2002 at 11:39 UTC ( [id://213119]=note: print w/replies, xml ) Need Help??


in reply to Graceful handling of DBI connect errors'

You could try somethig like
my $dbh = DBI->connect('dbi:Oracle:', qq{$bu_username/$bu_passwd@DESCRIPTION= (ADDRESS=(PROTOCOL=TCP) (HOST= $bu_host)(PORT$bu_port)) (CONNECT_DATA=(SID=$bu_sid)))}, "", {RaiseError=>1});
RaiseError is used in conjunction with eval {...} to catch the exception that is being thrown

perldoc DBI at the command prompt and a search for RaiseError
will get a fuller explanation
Hope this helps

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found