[svn:dbi] r14460 - dbi/branches/sqlengine/lib/DBI/DBD

[email protected] Mon, 4 Oct 2010 12:59:38 -0700 (PDT)
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: REHSACK
Date: Mon Oct  4 12:59:38 2010
New Revision: 14460

Modified:
   dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm

Log:
Adding fix to recognize SQL::Statement errors even if instantiated with RaiseError=0


Modified: dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm	(original)
+++ dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm	Mon Oct  4 12:59:38 2010
@@ -33,7 +33,7 @@
 use Carp;
 use vars qw( @ISA $VERSION $drh %methods_installed);
 
-$VERSION = "0.02";
+$VERSION = "0.03";
 
 $drh = undef;    # holds driver handle(s) once initialized
 
@@ -273,9 +273,9 @@
         {
             $stmt = eval { $class->new($statement) };
         }
-        if ($@)
+        if ($@ || $stmt->{errstr})
         {
-            $dbh->set_err( $DBI::stderr, $@ );
+            $dbh->set_err( $DBI::stderr, $@ || $stmt->{errstr} );
             undef $sth;
         }
         else