Not really possible to do this as all databases are different and produce different errors. You can examine $dbh->state to get an error code back and that simplifies the test to a simple string comparison e.g., $dbh->state eq '24000', but you will have to collect those error states for each database you use.
In reply to Re: post mortem on DBI errors
by mje
in thread post mortem on DBI errors
by redlemon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |