OSDN Git Service

* Model::Cowrapper: fix error handling
authorhylom <hylom@users.sourceforge.jp>
Thu, 24 Aug 2017 12:09:17 +0000 (21:09 +0900)
committerhylom <hylom@users.sourceforge.jp>
Thu, 24 Aug 2017 12:09:17 +0000 (21:09 +0900)
src/newslash_web/lib/Newslash/Model/Cowrapper.pm

index cb0a3b7..ddbb199 100644 (file)
@@ -716,7 +716,7 @@ EOSQL
     $sth->execute(@arguments);
     my $rs = $sth->fetchall_arrayref(+{});
     if (!defined $rs) {
-        $self->set_error("select failed", $dbh->{mysql_errorno});
+        $self->set_error("select failed", $dbh->errstr, $dbh->err);
         $dbh->disconnect();
         return;
     }