repository.grepcode.com$java$root@jdk$openjdk@6-b14
repository.grepcode.com$java$root@jdk$openjdk@6-b14@java$util$IllegalFormatException.java
file
oh
o
[]
I'm making a library that contains a few methods for parsing string dates and times. I am having difficulty deciding what exception those methods should throw when the string argument isn't parseable. I'm considering several options:
1. java.lang.IllegalArgumentException - an invalid string is clearly an illegal argument, but, to me, IllegalArgumentException typically means programming erro...
Unchecked exception thrown when a format string contains an illegal syntax
or a format specifier that is incompatible with the given arguments. Only
explicit subtypes of this exception which correspond to specific errors
should be instantiated.