output detail

This commit is contained in:
litongjava
2025-01-11 20:26:23 -10:00
parent 258b233251
commit f2daa4a842

View File

@ -29,10 +29,17 @@ server.listen(port, () => {
startWebSocketServer(server); startWebSocketServer(server);
process.on('uncaughtException', (err, origin) => { process.on('uncaughtException', (error) => {
logger.error(`Uncaught Exception at ${origin}: ${err}`); console.error('Uncaught Exception:', error);
console.error(error.stack);
}); });
process.on('unhandledRejection', (reason, promise) => { process.on('unhandledRejection', (reason, promise) => {
logger.error(`Unhandled Rejection at: ${promise}, reason: ${reason}`); console.error('Unhandled Rejection at:', promise, 'reason:', reason);
if (reason instanceof Error) {
console.error(reason.stack);
} else {
console.error(reason);
}
}); });