GlobalExceptionHandler

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class GlobalExceptionHandler(val type: KClass<out Throwable>)

Marks the annotated function as a global exception handler. This function will be called when an exception is thrown within the execution of an VitalCommand.ArgHandler annotated function, and is not caught by an underlying VitalCommand.ArgExceptionHandler annotated function.

Use this if you want to have a fallback for error messages, or if your want to reduce boilerplate.

Properties

Link copied to clipboard