Skip to content

Commit 807bfd7

Browse files
author
Vicky M
committed
Added CLI handling in case of null pointer exception
1 parent ece45cb commit 807bfd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public static void main(String[] args) throws ParseException, IOException {
2222
System.out.println("Please refer to the README.");
2323
}
2424
} catch (MissingOptionException e) {
25-
System.out.println("How to use");
25+
c.printHelp();
26+
} catch (NullPointerException npe){
2627
c.printHelp();
2728
}
2829
}

0 commit comments

Comments
 (0)