Address debug reporting in connector (zotero/zotero-connectors#97)

This commit is contained in:
Adomas Venčkauskas 2017-01-31 19:46:20 -03:00
parent 21a7a49a1b
commit ef0d9afe8e

View file

@ -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;
}
}
});
});