Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If i wanted to use the following code to handle database errors (with RaiseError = 1)
How would i get the error raised by the database in the if statement so I can include it in a custom error message? Many thankseval { $dbh->do(...); $dbh->do(...); $dbh->do(...); $dbh->do(...); } if($@) { handle_error(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how do i get the database error from this code
by Corion (Patriarch) on Jan 04, 2011 at 17:08 UTC | |
by Anonymous Monk on Jan 04, 2011 at 17:12 UTC | |
by ikegami (Patriarch) on Jan 04, 2011 at 17:21 UTC |