in reply to Re: DBI error and $@
in thread DBI error and $@
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. . .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: DBI error and $@
by Anonymous Monk on Dec 06, 2001 at 22:00 UTC | |
by Fastolfe (Vicar) on Dec 07, 2001 at 00:24 UTC | |
|
(arturo) Re^3: DBI error and $@
by arturo (Vicar) on Dec 06, 2001 at 22:05 UTC | |
by notsoevil (Pilgrim) on Dec 06, 2001 at 22:15 UTC |