From 0b64ad5783734b15af7caa9df410d24ff04a9d07 Mon Sep 17 00:00:00 2001 From: Yeo Kheng Meng Date: Wed, 27 Nov 2013 21:33:24 +0800 Subject: [PATCH] Print usage if input file not specified --- docs-to-pdf-converter/src/MainClass.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs-to-pdf-converter/src/MainClass.java b/docs-to-pdf-converter/src/MainClass.java index 718f57e..2f0e896 100644 --- a/docs-to-pdf-converter/src/MainClass.java +++ b/docs-to-pdf-converter/src/MainClass.java @@ -25,7 +25,7 @@ public static void main(String[] args){ try{ converter = processArguments(args); } catch ( IllegalArgumentException e){ - System.out.println("Input file not specified."); + System.out.println("\n\nInput file not specified."); return; } @@ -65,6 +65,7 @@ public static Converter processArguments(String[] args) throws IllegalArgumentEx if(inPath == null){ + parser.printUsage(System.err); throw new IllegalArgumentException(); }