From c01d5beed0834eea091c070336d229ea2b3a408d Mon Sep 17 00:00:00 2001 From: Matias Date: Wed, 27 Mar 2019 20:16:16 +0100 Subject: [PATCH] Exiting Process change --- Run.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Run.js b/Run.js index a9c441bb8..59cefc5fa 100644 --- a/Run.js +++ b/Run.js @@ -16,13 +16,13 @@ global.MARKET = { process.on('uncaughtException', function (err) { console.log('[INFO] Run -> uncaughtException -> err.message = ' + err.message); console.log('[INFO] Run -> uncaughtException -> err.stack = ', err.stack); - throw new Error() + process.exit(1) }); process.on('unhandledRejection', (reason, p) => { - console.log('[INFO] Run -> unhandledRejection -> reason = ' + reason); + console.log('[INFO] Run -> unhandledRejection -> reason = ' + JSON.stringify(reason)); console.log('[INFO] Run -> unhandledRejection -> p = ' + JSON.stringify(p)); - throw new Error() + process.exit(1) }); process.on('exit', function (code) {