aboutsummaryrefslogtreecommitdiffstats
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
commitd2117a8141eae8edb22862a48e14268258b3df85 (patch)
treeedb15485a138859937c2f09c35d442e0360759be
parent7320deb664449e74b6a78420a2b287de9ee2d41b (diff)
downloadprosody-d2117a8141eae8edb22862a48e14268258b3df85.tar.gz
prosody-d2117a8141eae8edb22862a48e14268258b3df85.zip
mod_storage_sql: Log an error on query failure.
-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