Imagine combining the automatic error detection of the DBI's RaiseError attribute and the error trapping of Perl's eval { ... } and the error handling properties of transactions. The result is a simple yet powerful way to write robust applications in Perl.If $@ is not containing the error message, why does the example from the book (and Randal's article) use this method of trapping errors?
...
Using RaiseError helps here because it generates a message (or Perl $@ variable value) that includes the underlying error from the driver, and the driver and method names.
--
notsoevil
--
Jeremiah 49:32 - And their camels shall be a booty. . .
In reply to Re: Re: DBI error and $@
by notsoevil
in thread DBI error and $@
by notsoevil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |