From 47f7f3a93f11dfd3f5b4718e8a22e6bdc55d275d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 2 Jun 2017 10:37:14 -0400 Subject: [PATCH] Fix logging of unhandled promise rejections --- resource/bluebird.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resource/bluebird.js b/resource/bluebird.js index 6e683fa07f..06728b4d1d 100644 --- 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; });