D. Bolliger wrote:
Tom Allison am Donnerstag, 23. November 2006 16:13:
[snipped some code]
I get a STDERR warning printed out everytime this has a duplicate key
violation...
Any idea why eval{} doesn't suppress this?
Hi Tom
It'd be a bad idea... eval BLOCK adds the ability to catch runtime
Tom Allison am Donnerstag, 23. November 2006 16:13:
[snipped some code]
> I get a STDERR warning printed out everytime this has a duplicate key
> violation...
>
> Any idea why eval{} doesn't suppress this?
Hi Tom
It'd be a bad idea... eval BLOCK adds the ability to catch runtime errors and
modi
I've been using something like this for Oracle for some time
and tried it with Postgresql.
(RaiseError doesn't change the outcome)
sub insert_token {
my $token = shift;
eval{ $sth1->execute($token) };
if ($@) {
return 1 if $@ =~ /duplicate key violates unique constraint/;