【发布时间】:2012-04-19 03:36:30
【问题描述】:
我正在开发一个快递应用。
我的 server.js 目前有以下内容
process.on('uncaughtException', function (err) {
console.log( "UNCAUGHT EXCEPTION " );
console.log( "[Inside 'uncaughtException' event] " + err.stack || err.message );
});
这会在每次出现错误时阻止服务器崩溃,但是,它只是坐在那里......
是否可以代替 console.log 发送带有错误详细信息的 500 错误页面?
【问题讨论】:
标签: node.js error-handling express