diff --git a/utilities/debugBuilder.js b/utilities/debugBuilder.js index 65be4d9..05cd948 100644 --- a/utilities/debugBuilder.js +++ b/utilities/debugBuilder.js @@ -18,7 +18,7 @@ exports.DebugBuilder = class DebugBuilder { this.ERROR = (...messageParts) => { const error = debug(`${appName}:${fileName}:ERROR`); error(messageParts); - if (process.env.EXIT_ON_ERROR) process.exit(); + if (process.env.EXIT_ON_ERROR) setTimeout(process.exit, process.env.EXIT_ON_ERROR_DELAY ?? 0); } } -} \ No newline at end of file +}