Merge pull request #57 from AAVikings/master

Exiting Process change
This commit is contained in:
benme authored and GitHub committed 2019-03-27 20:18:54 +01:00
commit 364300ca8f
1 file changed
+4 -12
+4 -12
View File
@@ -16,25 +16,17 @@ 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) {
try {
console.log('[INFO] Run -> process.on.exit -> About to exit -> code = ' + code);
throw new Error()
}
catch (err) {
console.log("[ERROR] Run -> process.on.exit -> Error Logging Error Code.");
console.log("[ERROR] Run -> process.on.exit -> err.message = " + err.message);
return;
}
console.log('[INFO] Run -> process.on.exit -> About to exit -> code = ' + code);
});
readExecutionConfiguration();