UNPKG

int-cli

Version:

INT is the new generation of bottom-up created system of IoT and blockchain

17 lines (16 loc) 623 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const process = require("process"); function init(logger) { process.on('unhandledRejection', (reason, p) => { console.log('Unhandled Rejection at: Promise ', p, ' reason: ', reason.stack); logger.error('Unhandled Rejection at: Promise ', p, ' reason: ', reason.stack); process.exit(-1); }); process.on('uncaughtException', (err) => { console.log('uncaught exception at: ', err.stack); logger.error('uncaught exception at: ', err.stack); process.exit(-1); }); } exports.init = init;