diff --git a/pom.xml b/pom.xml index 8ac331b..390b0c9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.fross quoter - 5.0.25 + 5.0.26 jar quoter @@ -208,7 +208,7 @@ org.fusesource.jansi jansi - 2.4.0 + 2.4.1 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9df3d8f..ea01c6e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: quoter -version: '5.0.25' +version: '5.0.26' summary: Command line utility to pull stock and index quotes description: | Quoter fetches online stock quotes and index data for easy display on diff --git a/src/main/java/org/fross/quoter/CommandLineParser.java b/src/main/java/org/fross/quoter/CommandLineParser.java index e759ca5..325a4e3 100644 --- a/src/main/java/org/fross/quoter/CommandLineParser.java +++ b/src/main/java/org/fross/quoter/CommandLineParser.java @@ -110,7 +110,7 @@ public void validate(String name, String value) throws ParameterException { } } - // Validate the trending duration value provided is between 1 and 99 + // Validate the trending duration value provided is between 1 and 365 final static public class TrendDurationValidator implements IParameterValidator { public TrendDurationValidator() { } @@ -121,10 +121,10 @@ public void validate(String name, String value) { try { intVal = Integer.parseInt(value); if (intVal < 1 || intVal > 365) { - Output.fatalError("Trend duration can not be '" + value + "'. Value must be between 1 and 365", 1); + throw new ParameterException(""); } } catch (Exception e) { - Output.fatalError("Trend duration can not be '" + value + "'. Value must be between 1 and 365", 1); + Output.fatalError("Trend duration can not be '" + value + "'. Value must be a number between 1 and 365", 1); } } }