On Thu, Oct 24, 2002 at 12:33:17AM -0700, Mark Dedlow wrote:
> 
> which is what I now realize I have to do if I don't know the 
> RaiseError status of the statement handles. It seems to me 
> that most of the code-neatness value that I often see cited 
> for RaiseError and eval blocks is lost.  In fact, individual die's 
> look pretty attractive again:
> 
> eval {
>    $sth1->execute or die $DBI::err;
>    $sth2->execute or die $DBI::err;
>    $sth3->execute or die $DBI::err;
>    $sth4->execute or die $DBI::err;
>    $sth5->execute or die $DBI::err;
> };

In that situation, yes (except I'd use $DBI::errstr).

But be aware that the error message ($@) from RaiseError is more
than just $DBI::errstr. So you'd get a slightly different error
message depending on if the handle that had the failure had RaiseError
enabled.

Tim.

Reply via email to