venki has asked for the wisdom of the Perl Monks concerning the following question:
$sth = $dbh->prepare($sqla); eval { local $SIG{'__DIE__'}; $answer = $sth->execute(); }; if ($@) { $mailbody .= "Cannot insert into $database \n"; } else { $sth->finish() if defined $sth; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: trapping database errors
by Abigail-II (Bishop) on Feb 12, 2003 at 16:06 UTC | |
|
Re: trapping database errors
by pfaut (Priest) on Feb 12, 2003 at 15:51 UTC | |
|
Re: trapping database errors
by perrin (Chancellor) on Feb 12, 2003 at 16:11 UTC | |
|
Re: trapping database errors
by dws (Chancellor) on Feb 12, 2003 at 17:08 UTC | |
|
Re: trapping database errors
by jobber (Sexton) on Feb 12, 2003 at 15:55 UTC | |
|
Re: trapping database errors
by jasonk (Parson) on Feb 12, 2003 at 15:53 UTC | |
by venki (Acolyte) on Feb 12, 2003 at 16:44 UTC |