public static class CommandLine.DefaultExceptionHandler extends java.lang.Object implements CommandLine.IExceptionHandler
PrintStream, followed by the
usage message for the command or subcommand whose input was invalid.
Implementation roughly looks like this:
System.err.println(paramException.getMessage());
paramException.getCommandLine().usage(System.err);
| Constructor and Description |
|---|
CommandLine.DefaultExceptionHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Object> |
handleException(CommandLine.ParameterException ex,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.String... args)
Handles a
ParameterException that occurred while parsing the command
line arguments and optionally returns a list of results. |
public java.util.List<java.lang.Object> handleException(CommandLine.ParameterException ex, java.io.PrintStream out, CommandLine.Help.Ansi ansi, java.lang.String... args)
CommandLine.IExceptionHandlerParameterException that occurred while parsing the command
line arguments and optionally returns a list of results.handleException in interface CommandLine.IExceptionHandlerex - 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 - the PrintStream to print help to if requestedansi - for printing help messages using ANSI styles and colorsargs - the command line arguments that could not be parsed