Exception: Invalid Option
bearbob opened this issue · comments
Not a bug, but an enhancement:
when calling cuneiform with a invalid argument an exception is raised. In my opinion it would be better to warn that an invalid argument was used and then show the output of "cuneiform -h".
Example:
$ cuneiform -i
escript: exception error: {invalid_option,"-i"}
in function cuneiform:main/1 ([...pathToBuild...]/lib/cuneiform/src/cuneiform.erl, line 43)
in call from escript:run/2 (escript.erl, line 757)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1
in call from init:start_em/1
I shortened the report to the actual error tuple. I am sure, the form could be further improved though.
jorgen@x240:~$ cuneiform -i
{invalid_option,"-i"}
I have changed the error message so that no hint to Erlang data structures remains.