SetExceptionHandler(IConfigurator, Action<Exception, ITypeResolver>) Method
Sets the ExceptionsHandler.
Setting ExceptionHandler
this way will use the
default exit code of -1.
public static IConfigurator SetExceptionHandler(this IConfigurator configurator, Action<Exception, ITypeResolver> exceptionHandler)
- Namespace
- Spectre
.Console .Cli - Containing Type
- Configurator
Extensions
Parameters
- IConfigurator configurator
- The configurator.
-
Action
<Exception, ITypeResolver> exceptionHandler - The Action that handles the exception.