commit 47f7f3a93f11dfd3f5b4718e8a22e6bdc55d275d
parent 4b0e2a955421fff49f156f60acfaf2b5e4117f40
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 2 Jun 2017 10:37:14 -0400
Fix logging of unhandled promise rejections
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/resource/bluebird.js b/resource/bluebird.js
@@ -16,13 +16,14 @@ Promise.onPossiblyUnhandledRejection((e, promise) => {
return;
}
- typeof Zotero !== 'undefined' && Zotero.debug('Possibly unhandled rejection:\n\n'
+ dump('Possibly unhandled rejection:\n\n'
+ (e.message
? e.message + "\n\n" + e.stack.split(/\n/)
// Filter out internal Bluebird calls
.filter(line => !line.includes('bluebird'))
.join('\n')
- : e), 1);
+ : e)
+ + '\n');
throw e;
});