Package picocli
Interface CommandLine.IExceptionHandler
-
- All Known Implementing Classes:
CommandLine.DefaultExceptionHandler
- Enclosing class:
- CommandLine
@Deprecated public static interface CommandLine.IExceptionHandlerDeprecated.Represents a function that can handle aParameterExceptionthat occurred while parsing the command line arguments. This is a functional interface whose functional method ishandleException(CommandLine.ParameterException, PrintStream, CommandLine.Help.Ansi, String...).Implementations of this function can be passed to the
CommandLine::parseWithHandlersmethods to handle situations when the command line could not be parsed.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.util.List<java.lang.Object>handleException(CommandLine.ParameterException ex, java.io.PrintStream out, CommandLine.Help.Ansi ansi, java.lang.String... args)Deprecated.Handles aParameterExceptionthat occurred while parsing the command line arguments and optionally returns a list of results.
-
-
-
Method Detail
-
handleException
java.util.List<java.lang.Object> handleException(CommandLine.ParameterException ex, java.io.PrintStream out, CommandLine.Help.Ansi ansi, 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 invalidout- thePrintStreamto print help to if requestedansi- for printing help messages using ANSI styles and colorsargs- the command line arguments that could not be parsed- Returns:
- a list of results, or an empty list if there are no results
-
-