mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 16:06:01 +00:00
process should exit on unhandled exception
This commit is contained in:
@@ -10,10 +10,7 @@ const logger = getLogger('apiIndex');
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
|
||||
if (err?.['code'] == 'EPIPE' && platformInfo.isForkedApi) {
|
||||
// stop subprocess on EPIPE errors
|
||||
process.exit(0);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
if (processArgs.startProcess) {
|
||||
|
||||
Reference in New Issue
Block a user