From 066cae3dbbd757c363cb48857c95650d37c839ac Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 14 Jul 2011 14:19:16 +0000 Subject: [PATCH] Include query in db parameter errors --- 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 index 845bef524..fb7a5621d 100644 --- 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 + "]"); } }