Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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
Replies are listed 'Best First'.
Re^2: SQLite handling of errors through common function
by techman2006 (Beadle) 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 scrutinizing the Monastery: (7)
As of 2015-08-30 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (346 votes), past polls