You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Brian Egge (JIRA)" <ji...@apache.org> on 2007/06/05 04:31:25 UTC
[jira] Created: (CLI-132) MissingOptionException should contain a
useful error message
MissingOptionException should contain a useful error message
------------------------------------------------------------
Key: CLI-132
URL: https://issues.apache.org/jira/browse/CLI-132
Project: Commons CLI
Issue Type: Improvement
Components: CLI-1.x
Affects Versions: 1.0, 1.1
Reporter: Brian Egge
Priority: Minor
Fix For: 1.1
The help formatter auto usage returns the options in a somewhat random order. This is because the options are inserted in a HashMap, and then a copy of the collection is returned with the getOptions() method.
The getOptions method should return the options in the order they were added, or in a sorted order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (CLI-132) MissingOptionException should contain a
useful error message
Posted by "Brian Egge (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Egge updated CLI-132:
---------------------------
Attachment: bug132.patch
Test case and fix.
> MissingOptionException should contain a useful error message
> ------------------------------------------------------------
>
> Key: CLI-132
> URL: https://issues.apache.org/jira/browse/CLI-132
> Project: Commons CLI
> Issue Type: Improvement
> Components: CLI-1.x
> Affects Versions: 1.0, 1.1
> Reporter: Brian Egge
> Priority: Minor
> Fix For: 1.1
>
> Attachments: bug132.patch
>
>
> Most exception message contain a useful message string like "Missing argument for option:". The MissingOptionException contains only the missing options. Adding a message to the exception would make it easier to catch a ParseException and display the getMessage() string.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Closed: (CLI-132) MissingOptionException should contain a
useful error message
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed CLI-132.
-----------------------------
Resolution: Fixed
Applied (r544360).
As it's an improvement, I wrapped the unit test into OptionsTest rather than having a separate bug test for it.
> MissingOptionException should contain a useful error message
> ------------------------------------------------------------
>
> Key: CLI-132
> URL: https://issues.apache.org/jira/browse/CLI-132
> Project: Commons CLI
> Issue Type: Improvement
> Components: CLI-1.x
> Affects Versions: 1.0, 1.1
> Reporter: Brian Egge
> Priority: Minor
> Fix For: 1.1
>
> Attachments: bug132.patch
>
>
> Most exception message contain a useful message string like "Missing argument for option:". The MissingOptionException contains only the missing options. Adding a message to the exception would make it easier to catch a ParseException and display the getMessage() string.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (CLI-132) MissingOptionException should contain a
useful error message
Posted by "Brian Egge (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Egge updated CLI-132:
---------------------------
Description: Most exception message contain a useful message string like "Missing argument for option:". The MissingOptionException contains only the missing options. Adding a message to the exception would make it easier to catch a ParseException and display the getMessage() string. (was: The help formatter auto usage returns the options in a somewhat random order. This is because the options are inserted in a HashMap, and then a copy of the collection is returned with the getOptions() method.
The getOptions method should return the options in the order they were added, or in a sorted order.)
> MissingOptionException should contain a useful error message
> ------------------------------------------------------------
>
> Key: CLI-132
> URL: https://issues.apache.org/jira/browse/CLI-132
> Project: Commons CLI
> Issue Type: Improvement
> Components: CLI-1.x
> Affects Versions: 1.0, 1.1
> Reporter: Brian Egge
> Priority: Minor
> Fix For: 1.1
>
> Attachments: bug132.patch
>
>
> Most exception message contain a useful message string like "Missing argument for option:". The MissingOptionException contains only the missing options. Adding a message to the exception would make it easier to catch a ParseException and display the getMessage() string.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org