commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Thompson <>
Subject [cli] help with required parameter without throwing exception
Date Thu, 06 Jan 2011 19:34:44 GMT
Hi there,
My scenario is this: I have one or more required parameters and also have a
help and a version parameter (obviously neither of these are required).

If the user only passes in a -h or -v (the require parameter is missing) the
parser will throw a ParseException and the CommandLine will be null.  I want
to be able differentiate between a user passing a -h or -v.

Is there a solution to this?


Jordan R. Thompson

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message