printException abstract method
void
printException(
- UsageException exception, {
- required UsageOutputHandler usageOutput,
- required CommandDefinition<
OptionDefinition> ? fromCommand,
Prints a usage exception to OutputSinks.err.
If exception is a CommandUsageException (this is the expected normal
case), the usage for its command is printed.
If it is not, the usage field of the UsageException is printed,
along with the fromCommand usage if provided.
In other words fromCommand is only used as a fallback if the exception
is not a CommandUsageException.
Implementation
void printException(
final UsageException exception, {
required final UsageOutputHandler usageOutput,
required final CommandDefinition? fromCommand,
});