From: hylom Date: Thu, 24 Aug 2017 12:09:17 +0000 (+0900) Subject: * Model::Cowrapper: fix error handling X-Git-Tag: v0.1.1~474 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4670e65ce665e331737eafcd6774a6e8f606fbe5;p=newslash%2Fnewslash.git * Model::Cowrapper: fix error handling --- diff --git a/src/newslash_web/lib/Newslash/Model/Cowrapper.pm b/src/newslash_web/lib/Newslash/Model/Cowrapper.pm index cb0a3b7b..ddbb199e 100644 --- a/src/newslash_web/lib/Newslash/Model/Cowrapper.pm +++ b/src/newslash_web/lib/Newslash/Model/Cowrapper.pm @@ -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; }