java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java
branchv_0
changeset 14 189b1260b942
parent 13 599aad77e986
child 15 bbd335b5410c
--- a/java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java	Mon Dec 16 12:10:45 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java	Mon Dec 16 15:15:32 2013 +0100
@@ -13,10 +13,23 @@
 
 	public static void main(String[] args) {
 		try {
+			/** Parse options */
 			CLIParser parser = new CLIParser();
 			CLIOptions options = parser.parseOptions(args);
+
+
+			options.validate();
+
+			/** Show info */
+			if (!options.getShowInfo().isEmpty()) {
+				InfoLister infoLister = new InfoLister();
+				infoLister.showInfo(options.getShowInfo(), System.err);
+			}
+
 		} catch (CLIParserException e) {
-			log.log(Level.SEVERE, null, e);
+			log.log(Level.SEVERE, "Unable to parse CLI options", e);
+		} catch (InvalidOptionsException e) {
+			log.log(Level.SEVERE, "Invalid CLI options", e);
 		}
 	}
 }