Method HandleException
- Namespace
- Ploch.CommandLine.Spectre.Commands
- Assembly
- Ploch.CommandLine.Spectre.dll
HandleException(Exception)
Handles an exception that occurred during command execution, or before it when the handler ConfigureCommandApp(Action<IConfigurator>) installs routes a pre-command failure here.
int HandleException(Exception ex)
Parameters
exExceptionThe exception that was thrown: by the command, or before it ran - by a command interceptor, or by a command that does not derive from the base classes.
Returns
- int
An integer representing the exit code to return to the operating system. Typically, a non-zero value indicates an error condition.