commit 066cae3dbbd757c363cb48857c95650d37c839ac parent 06acd954df1138865ba22aab869118b5faf5fe58 Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 14 Jul 2011 14:19:16 +0000 Include query in db parameter errors Diffstat:
| M | chrome/content/zotero/xpcom/db.js | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js @@ -302,11 +302,11 @@ Zotero.DBConnection.prototype.getStatement = function (sql, params, checkParams) if (params) { if (checkParams) { if (numParams == 0) { - throw ("Parameters provided for query without placeholders"); + throw ("Parameters provided for query without placeholders [QUERY: " + sql + "]"); } else if (numParams != params.length) { throw ("Incorrect number of parameters provided for query " - + "(" + params.length + ", expecting " + numParams + ")"); + + "(" + params.length + ", expecting " + numParams + ") [QUERY: " + sql + "]"); } }