aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commitb3d1a28503df96d8970e2ffcdf30fa6ec2e1e0b7 (patch)
tree373d6844e3bf480589b707b20d40a5703b299a12 /plugins
parent89d1d6cccf95d274da212eab69e3a8557f6040de (diff)
downloadprosody-b3d1a28503df96d8970e2ffcdf30fa6ec2e1e0b7.tar.gz
prosody-b3d1a28503df96d8970e2ffcdf30fa6ec2e1e0b7.zip
mod_storage_sql: Return actual error string on commit failure.
Diffstat (limited to 'plugins')
-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