boolean shouldHaveArg = theOptionMatcher.hasArg(c);
String arg = theCurrentOption.getArgument();
if(!theOptionMatcher.match(c)) {
ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
new Character(c));
throw (new IllegalArgumentException(msg.toString()));
}
else if(shouldHaveArg && (arg == null)) {
ErrorMsg msg = new ErrorMsg(ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR,
new Character(c));
throw (new MissingOptArgException(msg.toString()));