nodejs 捕获异步未处理异常处理比较麻烦
简单的方法是监听全局的process 的uncaughtException 进行处理
process.on('uncaughtException', function (err) { console.error('An uncaught error occurred!'); console.error(err.stack); });
nodejs 捕获异步未处理异常处理比较麻烦
简单的方法是监听全局的process 的uncaughtException 进行处理
process.on('uncaughtException', function (err) { console.error('An uncaught error occurred!'); console.error(err.stack); });