# HG changeset patch # User Waqas Hussain # Date 1354247403 -18000 # Node ID f5d121846d53160d9bb7b0a67864e59ed4b4210f # Parent c5edb08fc7cb8708b4547e9693448433813d2e85 mod_storage_sql: Return actual error string on commit failure. diff -r c5edb08fc7cb -r f5d121846d53 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Thu Nov 29 07:38:00 2012 +0500 +++ b/plugins/mod_storage_sql.lua Fri Nov 30 08:50:03 2012 +0500 @@ -228,7 +228,8 @@ return ...; end local function commit(...) - if not connection:commit() then return nil, "SQL commit failed"; end + local success,err = connection:commit(); + if not success then return nil, "SQL commit failed: "..tostring(err); end return ...; end