use of org.apache.commons.cli.MissingArgumentException in project onebusaway-gtfs-modules by OneBusAway.
the class GtfsMergerMain method run.
/**
***************************************************************************
* {@link Runnable} Interface
***************************************************************************
*/
public void run(String[] args) throws IOException {
if (needsHelp(args)) {
printHelp();
System.exit(0);
}
try {
CommandLine cli = _parser.parse(_options, args, true);
runApplication(cli, args);
} catch (MissingOptionException ex) {
System.err.println("Missing argument: " + ex.getMessage());
printHelp();
} catch (MissingArgumentException ex) {
System.err.println("Missing argument: " + ex.getMessage());
printHelp();
} catch (UnrecognizedOptionException ex) {
System.err.println("Unknown argument: " + ex.getMessage());
printHelp();
} catch (AlreadySelectedException ex) {
System.err.println("Argument already selected: " + ex.getMessage());
printHelp();
} catch (ParseException ex) {
System.err.println(ex.getMessage());
printHelp();
} catch (Exception ex) {
ex.printStackTrace();
}
}
Aggregations