Revela-v4/middleware/catchErrors.js
2024-10-04 12:09:51 -05:00

11 lines
No EOL
306 B
JavaScript

import chalk from "chalk";
process.on('uncaughtException', (err) => {
console.log(chalk.bold.red(`[Alu] Caught error!\n${err.stack}`));
process.exit(1);
});
process.on("uncaughtExceptionMonitor", (err) => {
console.log(chalk.bold.red(`[Alu] Caught error!\n${err.stack}`));
process.exit(1);
})