author | Matthew Wild <mwild1@gmail.com> |
Tue, 31 Mar 2015 12:45:58 +0100 | |
changeset 1642 | 398c4aaccf6d |
parent 1641 | 9276473ee5be |
child 1643 | 1d96629f5dda |
--- a/mod_log_messages_sql/mod_log_messages_sql.lua Tue Mar 31 12:44:28 2015 +0100 +++ b/mod_log_messages_sql/mod_log_messages_sql.lua Tue Mar 31 12:45:58 2015 +0100 @@ -98,7 +98,11 @@ return ...; end function sql.commit(...) - if not connection:commit() then return nil, "SQL commit failed"; end + local ok, err = connection:commit(); + if not ok then + module:log("error", "SQL commit failed: %s", tostring(err)); + return nil, "SQL commit failed: "..tostring(err); + end return ...; end