From ead88b0a037253a02fd47d3f4bae88adc315ec76 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Fri, 22 Jun 2018 20:43:27 +0300 Subject: [PATCH] feat(debug): debug rejections --- src/background/background.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/background/background.js b/src/background/background.js index 5e66520..f9c7a26 100644 --- a/src/background/background.js +++ b/src/background/background.js @@ -96,6 +96,9 @@ console.log('Free memory:', (os.freemem() / (1024 * 1024)).toFixed(2), 'MB') if(portative) console.log('portative compability') +// handle promise rejections +process.on('unhandledRejection', r => console.log('Rejection:', r)); + const shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) { // Someone tried to run a second instance, we should focus our window. console.log('openned second application, just focus this one')