log errors with default logger

pull/3419/head
Yuxuan Zhang 2 years ago committed by GitHub
parent 32ead8a75a
commit 2f07e6d963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,10 @@ export function bindShortcuts(
if (input === '\x03' || input === '\x04') { if (input === '\x03' || input === '\x04') {
await server await server
.close() .close()
.catch(() => (process.exitCode = 1)) .catch((e) => {
server.config.logger.error(e)
process.exitCode = 1
})
.finally(() => process.exit()) .finally(() => process.exit())
} }

Loading…
Cancel
Save