From a5e0525cb3a5e6a3f4ba51d0bcd4ec194941974f Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Tue, 21 Oct 2014 15:26:10 +0200 Subject: Added usage info in case of invalid given arguments. --- src/main/java/org/openslx/satellitedaemon/App.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/openslx/satellitedaemon/App.java b/src/main/java/org/openslx/satellitedaemon/App.java index 2982a84..4a6bb7b 100644 --- a/src/main/java/org/openslx/satellitedaemon/App.java +++ b/src/main/java/org/openslx/satellitedaemon/App.java @@ -88,6 +88,17 @@ public class App log.error( "Illegal option: --updateaddress requires " ); System.exit( 2 ); } + } else { + // no correct option was selected. + log.error( "Illegal option: given argument(s) not valid." ); + log.info( "\nUsage: java -jar target/satellite-daemon-1.0-SNAPSHOT-jar-with-dependencies.jar [options]\n" + + " options:\n" + + " [--checkconfig] or\n" + + " [--genid ] or\n" + + " [--import ] or\n" + + " [--submitkey ] or\n" + + " [--updateaddress ]"); + System.exit( 2 ); } } else if ( args.length == 0 ) { // No Option choosed, try to load existing identity. -- cgit v1.2.3-55-g7522