[ic] DBI errors, and catching them in a [perl] block

Jeff Boes jeff at endpoint.com
Mon Nov 28 14:03:33 EST 2005


What techniques do others use in catching DBI errors within a Perl
block? For instance,

[perl table=mytable]
my $dbh = $Sql{mytable};
$dbh->do(q{INSERT INTO mytable (a, b, c) VALUES (?, ?, ?)}, ...
[/perl]

I have not yet found any way to catch an INSERT error (e.g., bad data
type, missing parameter, foreign key violation, unique constraint
violation).


More information about the interchange-users mailing list