Added check for argument parsing failure
This commit is contained in:
parent
947bccb6da
commit
670779a3aa
@ -115,6 +115,12 @@ public class Main extends Application {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
MainParsedArguments parsedArgs = new MainParsedArguments(args);
|
MainParsedArguments parsedArgs = new MainParsedArguments(args);
|
||||||
|
|
||||||
|
if (parsedArgs.getParseException() != null) {
|
||||||
|
logger.log(Level.SEVERE, "Failed when parsing arguments", parsedArgs.getParseException());
|
||||||
|
parsedArgs.printHelp();
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (parsedArgs.getHelpFlag()) {
|
if (parsedArgs.getHelpFlag()) {
|
||||||
parsedArgs.printHelp();
|
parsedArgs.printHelp();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user