commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Could the message for an illegal character in an option contain more information
Date Mon, 06 Apr 2015 12:22:09 GMT
I suggest you create a JIRA enhancement request so this can be tracked properly.

On 5 April 2015 at 11:41, David Goodenough
<david.goodenough@btconnect.com> wrote:
> Currently the code in org.apache.commons.cli.OptionValidator generates an
> IllegalArgumentException which contains the message:-
>
> "illegal option value '" + ch + "'"
>
> This is generated in two places, one for single character options and one for
> multi character options.
>
> However this does not tell the caller which option it is contains this
> character, which makes debugging the error without the source (i.e most
> users) extremely difficult.
>
> Would it not be possible to change the message to:-
>
> "illegal option '" + opt + "' value '" + ch + "'"
>
> which would then at least identify the offending option.
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message