diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index e32aa46e86..cb92a8f69a 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -662,7 +662,13 @@ Zotero.DBConnection.prototype.queryAsync = Zotero.Promise.coroutine(function* (s var eStr = e + ""; eStr = eStr.indexOf("Error: ") == 0 ? eStr.substr(7): e; throw new Error(eStr + ' [QUERY: ' + sql + '] ' - + (params ? '[PARAMS: ' + params.join(', ') + '] ' : '') + + (params + ? '[PARAMS: ' + + (Array.isArray(params) + ? params.map(x => JSON.stringify(x)).join(', ') + : JSON.stringify(params) + ) + '] ' + : '') + '[ERROR: ' + e.errors[0].message + ']'); } else {