Package picocli
Interface CommandLine.IExceptionHandler2<R>
-
- Type Parameters:
R- the return type of this handler
- All Known Implementing Classes:
CommandLine.DefaultExceptionHandler
- Enclosing class:
- CommandLine
@Deprecated public static interface CommandLine.IExceptionHandler2<R>Deprecated.Classes implementing this interface know how to handleParameterExceptions(usually from invalid user input) andExecutionExceptionsthat occurred while executing theRunnableorCallablecommand.Implementations of this interface can be passed to the
CommandLine::parseWithHandlersmethod.This interface replaces the
CommandLine.IParseResultHandlerinterface.- Since:
- 3.0
- See Also:
CommandLine.DefaultExceptionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RhandleExecutionException(CommandLine.ExecutionException ex, CommandLine.ParseResult parseResult)Deprecated.Handles aExecutionExceptionthat occurred while executing theRunnableorCallablecommand and optionally returns a list of results.RhandleParseException(CommandLine.ParameterException ex, java.lang.String[] args)Deprecated.Handles aParameterExceptionthat occurred while parsing the command line arguments and optionally returns a list of results.
-
-
-
Method Detail
-
handleParseException
R handleParseException(CommandLine.ParameterException ex, java.lang.String[] args)
Deprecated.Handles aParameterExceptionthat occurred while parsing the command line arguments and optionally returns a list of results.- Parameters:
ex- the ParameterException describing the problem that occurred while parsing the command line arguments, and the CommandLine representing the command or subcommand whose input was invalidargs- the command line arguments that could not be parsed- Returns:
- an object resulting from handling the exception
-
handleExecutionException
R handleExecutionException(CommandLine.ExecutionException ex, CommandLine.ParseResult parseResult)
Deprecated.Handles aExecutionExceptionthat occurred while executing theRunnableorCallablecommand and optionally returns a list of results.- Parameters:
ex- the ExecutionException describing the problem that occurred while executing theRunnableorCallablecommand, and the CommandLine representing the command or subcommand that was being executedparseResult- the result of parsing the command line arguments- Returns:
- an object resulting from handling the exception
-
-