1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java Mon Dec 16 12:10:45 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java Mon Dec 16 15:15:32 2013 +0100
1.3 @@ -13,10 +13,23 @@
1.4
1.5 public static void main(String[] args) {
1.6 try {
1.7 + /** Parse options */
1.8 CLIParser parser = new CLIParser();
1.9 CLIOptions options = parser.parseOptions(args);
1.10 +
1.11 +
1.12 + options.validate();
1.13 +
1.14 + /** Show info */
1.15 + if (!options.getShowInfo().isEmpty()) {
1.16 + InfoLister infoLister = new InfoLister();
1.17 + infoLister.showInfo(options.getShowInfo(), System.err);
1.18 + }
1.19 +
1.20 } catch (CLIParserException e) {
1.21 - log.log(Level.SEVERE, null, e);
1.22 + log.log(Level.SEVERE, "Unable to parse CLI options", e);
1.23 + } catch (InvalidOptionsException e) {
1.24 + log.log(Level.SEVERE, "Invalid CLI options", e);
1.25 }
1.26 }
1.27 }