From ef0d9afe8e96517288b76097fb82e9682a6cb487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 31 Jan 2017 19:46:20 -0300 Subject: [PATCH] Address debug reporting in connector (zotero/zotero-connectors#97) --- chrome/content/zotero/xpcom/debug.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/debug.js b/chrome/content/zotero/xpcom/debug.js index 05ba3e6e5..963d7903f 100644 --- a/chrome/content/zotero/xpcom/debug.js +++ b/chrome/content/zotero/xpcom/debug.js @@ -208,17 +208,23 @@ Zotero.Debug = new function () { } } } - - if (Zotero.getErrors) { - return Zotero.getSystemInfo().then(function(sysInfo) { + + return Zotero.getSystemInfo().then(function(sysInfo) { + if (Zotero.isConnector) { + return Zotero.Error.getErrors().then(function(errors) { + return errors.join('\n\n') + + "\n\n" + sysInfo + "\n\n" + + "=========================================================\n\n" + + output; + }); + } + else { return Zotero.getErrors(true).join('\n\n') + "\n\n" + sysInfo + "\n\n" + "=========================================================\n\n" + output; - }); - } else { - return output; - } + } + }); });