summaryrefslogtreecommitdiff
path: root/packages/backend/src/boot/entry.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-06-12 21:36:37 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-12 21:36:46 -0400
commit0a56ce92caf512feb729d8dfa48bc654980fe5cd (patch)
treecb483df3062bd84ca981a1fd110748207a15866c /packages/backend/src/boot/entry.ts
parentmerge: Emit log messages with correct level (!1097) (diff)
downloadsharkey-0a56ce92caf512feb729d8dfa48bc654980fe5cd.tar.gz
sharkey-0a56ce92caf512feb729d8dfa48bc654980fe5cd.tar.bz2
sharkey-0a56ce92caf512feb729d8dfa48bc654980fe5cd.zip
use uncaughtExceptionMonitor instead uncaughtException
Diffstat (limited to 'packages/backend/src/boot/entry.ts')
-rw-r--r--packages/backend/src/boot/entry.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/boot/entry.ts b/packages/backend/src/boot/entry.ts
index e52d77ab9b..9a830403e7 100644
--- a/packages/backend/src/boot/entry.ts
+++ b/packages/backend/src/boot/entry.ts
@@ -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 => {