aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-11-30 08:50:03 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-11-30 08:50:03 +0500
commit7434f41ee4c61ab7d5786f2eb91d0693949c39bd (patch)
tree373d6844e3bf480589b707b20d40a5703b299a12 /plugins/mod_storage_sql.lua
parent753581cc0d82e90383873958a36cd236e5623cbe (diff)
downloadprosody-7434f41ee4c61ab7d5786f2eb91d0693949c39bd.tar.gz
prosody-7434f41ee4c61ab7d5786f2eb91d0693949c39bd.zip
mod_storage_sql: Return actual error string on commit failure.
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r--plugins/mod_storage_sql.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index f6fa94e7..eed3fec9 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -228,7 +228,8 @@ local function rollback(...)
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