1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 04:04:16 +00:00

use uncaughtExceptionMonitor instead uncaughtException

This commit is contained in:
Hazelnoot
2025-06-12 21:36:37 -04:00
parent 20370e5e75
commit 0a56ce92ca
5 changed files with 8 additions and 8 deletions

View File

@@ -64,13 +64,13 @@ async function main() {
}
// Display detail of uncaught exception
process.on('uncaughtException', err => {
process.on('uncaughtExceptionMonitor', ((err, origin) => {
try {
logger.error('Uncaught exception:', err);
logger.error(`Uncaught exception (${origin}):`, err);
} catch {
console.error('Uncaught exception:', err);
console.error(`Uncaught exception (${origin}):`, err);
}
});
}));
// Dying away...
process.on('exit', code => {

View File

@@ -101,7 +101,7 @@ async function watchSrc() {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('uncaughtException', reject);
process.on('uncaughtExceptionMonitor', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();

View File

@@ -99,7 +99,7 @@ async function watchSrc() {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('uncaughtException', reject);
process.on('uncaughtExceptionMonitor', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();

View File

@@ -100,7 +100,7 @@ async function watchSrc() {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('uncaughtException', reject);
process.on('uncaughtExceptionMonitor', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();

View File

@@ -99,7 +99,7 @@ async function watchSrc() {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('uncaughtException', reject);
process.on('uncaughtExceptionMonitor', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();