diff options
author | Waqas Hussain <waqas20@gmail.com> | 2012-11-30 08:50:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2012-11-30 08:50:03 +0500 |
commit | b3d1a28503df96d8970e2ffcdf30fa6ec2e1e0b7 (patch) | |
tree | 373d6844e3bf480589b707b20d40a5703b299a12 | |
parent | 89d1d6cccf95d274da212eab69e3a8557f6040de (diff) | |
download | prosody-b3d1a28503df96d8970e2ffcdf30fa6ec2e1e0b7.tar.gz prosody-b3d1a28503df96d8970e2ffcdf30fa6ec2e1e0b7.zip |
mod_storage_sql: Return actual error string on commit failure.
-rw-r--r-- | plugins/mod_storage_sql.lua | 3 |
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 |