From 9170603b887d8a7a9aa2d606b2d4d8c784fe4a18 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 21 Mar 2007 14:30:30 +0000 Subject: [PATCH] closes #546, errors should always be logged to the error console currently, errors that happen during detection (as opposed to translation) are not logged, since it might not be desirable to flood the error console if a site changes its layout in a way that produces errors in the detectCode. if there are any objections, this behavior is easy to change. --- chrome/content/zotero/xpcom/translate.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js index 549ac5d01..3de8ee5d2 100644 --- a/chrome/content/zotero/xpcom/translate.js +++ b/chrome/content/zotero/xpcom/translate.js @@ -886,6 +886,10 @@ Zotero.Translate.prototype._translationComplete = function(returnValue, error) { this._closeStreams(); if(!returnValue) { + // report error to console + Components.utils.reportError(error); + + // report error to debug log var errorString = this._generateErrorString(error); this._debug("Translation using "+(this.translator && this.translator[0] && this.translator[0].label ? this.translator[0].label : "no translator")+" failed: \n"+errorString);