Subject: | DBI will not always rise an exception for errors |
Some operations of Data::ObjectDriver relay on DBI to return an exception.
For example, in Data::ObjectDriver::Driver::DBI::_insert_or_replace, the
following lines:
eval { $sth->execute };
die "Failed to execute $sql with ".join(", ",@$cols).": $@" if $@;
However, it is not always true, and can be set using the RaiseError
settings. If RaiseError set to 0, then it will return false instead of
error.
It is possible to temporary set the RaiseError to 1 using this line:
local $dbh->{RaiseError} = 1;