diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 07f0cf18c1..dfd5e27e3b 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -177,7 +177,7 @@ Zotero.DBConnection.prototype.query = function (sql,params) { var dberr = (db.lastErrorString!='not an error') ? ' [ERROR: ' + db.lastErrorString + ']' : ''; - throw(e + ' [QUERY: ' + sql + ']' + dberr); + throw new Error(e + ' [QUERY: ' + sql + ']' + dberr); } } @@ -256,7 +256,7 @@ Zotero.DBConnection.prototype.getStatement = function (sql, params, checkParams) catch (e) { var dberr = (db.lastErrorString!='not an error') ? ' [ERROR: ' + db.lastErrorString + ']' : ''; - throw(e + ' [QUERY: ' + sql + ']' + dberr); + throw new Error(e + ' [QUERY: ' + sql + ']' + dberr); } var numParams = statement.parameterCount;