Add an exit delay and key
- key 'EXIT_ON_ERROR_DELAY'
This commit is contained in:
@@ -18,7 +18,7 @@ exports.DebugBuilder = class DebugBuilder {
|
|||||||
this.ERROR = (...messageParts) => {
|
this.ERROR = (...messageParts) => {
|
||||||
const error = debug(`${appName}:${fileName}:ERROR`);
|
const error = debug(`${appName}:${fileName}:ERROR`);
|
||||||
error(messageParts);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user