mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 18:46:00 +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 => {
|
process.on('uncaughtException', err => {
|
||||||
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
|
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
|
||||||
if (err?.['code'] == 'EPIPE' && platformInfo.isForkedApi) {
|
process.exit(1);
|
||||||
// stop subprocess on EPIPE errors
|
|
||||||
process.exit(0);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (processArgs.startProcess) {
|
if (processArgs.startProcess) {
|
||||||
|
|||||||
Reference in New Issue
Block a user