Optionalerror: unknown
An optional error to log before exiting. If not provided, the process will exit with the specified code.
OptionalexitCode: number
The exit code to use. Defaults to 1 if there's an error, or 0 if the exit is successful.
A void with no return value. This exits the process.
Gracefully exit a process with pretty output depending on the error type and optional async teardown.
This exit handles: