commit ef0d9afe8e96517288b76097fb82e9682a6cb487 parent 21a7a49a1b9d080c7c21ef340f9229509cf6e73f Author: Adomas VenĨkauskas <adomas.ven@gmail.com> Date: Tue, 31 Jan 2017 19:46:20 -0300 Address debug reporting in connector (zotero/zotero-connectors#97) Diffstat:
| M | 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 @@ -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; - } + } + }); });