aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-12-27 06:10:35 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-12-27 06:10:35 +0500
commit3043e00706256ba5fd5ab634f37b21e2db9408ee (patch)
treec22268159e1505f98a0b0124cd653fe66655f427 /plugins
parentca2bc4fcce6d929a67eca21ea3a401c701f472f0 (diff)
downloadprosody-3043e00706256ba5fd5ab634f37b21e2db9408ee.tar.gz
prosody-3043e00706256ba5fd5ab634f37b21e2db9408ee.zip
mod_storage_sql: Log an error on query failure.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 85c9fbdf..75080726 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -91,7 +91,7 @@ local function getsql(sql, ...)
end
-- do prepared statement stuff
local stmt, err = connection:prepare(sql);
- if not stmt then return nil, err; end
+ if not stmt then module:log("error", "QUERY FAILED: %s %s", err, debug.traceback()); return nil, err; end
-- run query
local ok, err = stmt:execute(host or "", user or "", store or "", ...);
if not ok then return nil, err; end