smithandrewl/jpwgen — Issue #2: NumberFormatException for number command line option
Author: smithandrewl
Created: 2012-02-03 00:23:27+00:00
State: open

### Description

If the `--number` option is used and a non string value is specified, a NumberFormatException is thrown.

### Steps to reproduce

Run jpw with the following command: `java -jar jpwgen-0.0.1-SNAPSHOT.jar -d --number j`

### Current Result

Exception in thread "main" java.lang.NumberFormatException: For input string: "j"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at org.jpwgen.Main.main(Main.java:82)

### Expected Result

A message such as `Error: The argument to number must be a number` should be displayed.