From 4670e65ce665e331737eafcd6774a6e8f606fbe5 Mon Sep 17 00:00:00 2001 From: hylom Date: Thu, 24 Aug 2017 21:09:17 +0900 Subject: [PATCH] * Model::Cowrapper: fix error handling --- src/newslash_web/lib/Newslash/Model/Cowrapper.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.11.0