Skip to content

Commit

Permalink
fix(server): error handling for server #112
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Jan 7, 2020
1 parent db7e27a commit 81c61fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/background/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ logT('system', 'Free memory:', (os.freemem() / (1024 * 1024)).toFixed(2), 'MB')
logT('system', 'NodeJS:', process.version)
logT('system', 'Web server')

// handle promise rejections
process.on('unhandledRejection', r => logTE('system', 'Rejection:', r));
process.on('uncaughtException', (err, origin) => logTE('system', 'Exception:', err, 'Origin:', origin));

const majorVersion = /v?([0-9]+)\.?([0-9]+)?\.?([0-9]+)?\.?([0-9]+)?/.exec(process.version)[1]
if(majorVersion < 8)
{
Expand Down

0 comments on commit 81c61fb

Please sign in to comment.