Greetings!
My eval blocks are not catching exceptions when executed on RH el5
installations.
The following code worked as expected on an RH ELsmp machine,
but when the code got relocated eval stopped working as expected.
The code couldn't be much simpler ...
sub updateFoo() {
...
eval {
my $stmnt = $dbHandle->prepare("UPDATE ????? set $attribute = $value \
WHERE
decimal_latidude = $dLat \
AND
decimal_longitude = $dLon \
AND image_date =
to_date('2008-03-05', 'yyyy-mm-dd')");
$stmnt->execute();
};
if ($@) {
print("Error in updateFoo() - $...@\n");
$dbHandle->disconnect();
closeFileHandles();
exit(-1);
}
}
This used to work on ELsmp (2.6.9-78.0.17.ELsmp) with DBI-1.50.tar.gz,
and DBD-Oracle-1.17.tar.gz using default values for RaiseError
and PrintError.
I am now on an RH el5 (2.6.18-53.1.14.el5) installation using
perl-DBI-1.40-8.x86_64.rpm
and perl-DBD-Oracle-1.19-1.el5.x86_64.rpm.
I have intentionally misspelled 'decimal_latidude' to trigger
a ORA-00904: "DECIMAL_LATIDUDE": invalid identifier (as
reported by DBI->trace(4)).
I have fiddled with:
$dbHandle->{RaiseError} = 1;
$dbHandle->{PrintError} = 0;
as well as
$stmnt->{RaiseError} = 1;
and all that happens is a bailout on $stmnt->execute() with
the word 'Aborted' dumped to stderr ($stmnt->execute() does not return
a value).
$dbHandle->do() suffers in a similar fashion.
Any ideas?
Thank you.
KFW