mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-08-11 02:08:43 +00:00
output detail
This commit is contained in:
13
src/app.ts
13
src/app.ts
@ -29,10 +29,17 @@ server.listen(port, () => {
|
||||
|
||||
startWebSocketServer(server);
|
||||
|
||||
process.on('uncaughtException', (err, origin) => {
|
||||
logger.error(`Uncaught Exception at ${origin}: ${err}`);
|
||||
process.on('uncaughtException', (error) => {
|
||||
console.error('Uncaught Exception:', error);
|
||||
console.error(error.stack);
|
||||
});
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user