|P is for Practical|
post mortem on DBI errorsby redlemon (Hermit)
|on Jan 23, 2009 at 08:11 UTC||Need Help??|
redlemon has asked for the
wisdom of the Perl Monks concerning the following question:
I'm working on a Catalyst application and find myself doing something like:
Basically, I'm parsing the raw error message from my DBI engine (DBD::SQLite in this case).
If I switched to a different engine, I would probably get a different error message, so this would fail. Is there a way to find out the type of error and the column name it failed on? I checked $@, because it's an exception, but it only has a 'msg' method.
Ideally, I would like to do something like:
Is there some way to achieve this?