ExitProgramException
fun ExitProgramException(errorCode: ErrorCode, message: String, throwable: Throwable? = null): ExitProgramException(source)
Factory function to create an ExitProgramException with an optional single cause.
This is a convenience function that simplifies the creation of an ExitProgramException when dealing with zero or one throwable cause. It converts the nullable throwable parameter into the vararg causes array expected by the ExitProgramException constructor.
Return
A new ExitProgramException instance configured with the provided parameters.
Parameters
errorCode
The error code that identifies the type of error and determines the program exit status.
message
The detailed error message describing what went wrong.
throwable
The optional underlying cause of this exception. If null, the exception will have no causes.