smithandrewl/jpwgen — Issue #1: NumberFormatException for length command line option
Author: smithandrewl
Created: 2012-01-29 21:25:50+00:00
State: open

### Description

If the `--length` 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 -L 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:58)

### Expected Result

A message such as `The argument to -L must be a number` should be displayed.