in simulator/src/main/java/com/google/cloud/App.java [78:115]
public static void main(String argv[]) {
// Initialize the parsing objects
App app = new App();
JCommander parser = JCommander
.newBuilder()
.addObject(app)
.build();
try {
// Parse the user-specifiedc arguments
parser.parse(argv);
if (app.help) {
parser.usage();
System.exit(1);
}
// Run the simulator
app.runSimulator();
}
// Failure parsing an argument (show usage)
catch (ParameterException e) {
System.out.println(
String.format("Failed parsing command line: %s", e.getMessage()));
parser.usage();
System.exit(1);
}
// Runtime exception -- just show error
catch (Exception e) {
e.printStackTrace();
System.out.println(
String.format("Failed running: %s", e.getMessage()));
System.exit(1);
}
}