Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: SQLite handling of errors through common function

by daxim (Chaplain)
on Nov 06, 2013 at 12:35 UTC ( #1061419=note: print w/ replies, xml ) Need Help??


in reply to SQLite handling of errors through common function

You cannot easily identify the type of error because DBI uses strings, not objects, to represent an error. You have to parse the messages to differentiate, unfortunately.

edit: You're also looking for a logger. Log::Any is nice.


Comment on Re: SQLite handling of errors through common function
Re^2: SQLite handling of errors through common function
by techman2006 (Sexton) on Nov 06, 2013 at 14:56 UTC

    So we don't have clear way as we get in other language like C where we can check if the object is NULL then it seems to be a connection error. Similarly for other operations.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-07-23 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (130 votes), past polls