This approach introduces a ParseResult object which allows for the collection of multiple parse errors from the user input
and then provides this back to the caller to decide what to do. E.G. send the user the to the help dialog.
This keeps the existing API and fits with the desire to keep the parsing logic agnostic to the details of the HelpOption.
The existing pattern still fails fast with an exception:
This is a proposed fix for: https://github.com/airlift/airline/issues/22
This approach introduces a ParseResult object which allows for the collection of multiple parse errors from the user input and then provides this back to the caller to decide what to do. E.G. send the user the to the help dialog.
This keeps the existing API and fits with the desire to keep the parsing logic agnostic to the details of the HelpOption.
The existing pattern still fails fast with an exception:
This fix introduces the following pattern from the caller's perspective:
The call to runOrShowHelp will: