From 2f07e6d963b58b5c9304a5d5bdaf7db62bf04587 Mon Sep 17 00:00:00 2001 From: Yuxuan Zhang Date: Fri, 5 Jan 2024 12:15:59 -0500 Subject: [PATCH] log errors with default logger --- src/node/shortcuts.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node/shortcuts.ts b/src/node/shortcuts.ts index ff0c64df..d3725960 100644 --- a/src/node/shortcuts.ts +++ b/src/node/shortcuts.ts @@ -35,7 +35,10 @@ export function bindShortcuts( if (input === '\x03' || input === '\x04') { await server .close() - .catch(() => (process.exitCode = 1)) + .catch((e) => { + server.config.logger.error(e) + process.exitCode = 1 + }) .finally(() => process.exit()) }