Exceptions of this type can be thrown if the enumeration value that is needed is not found in the current JVM. This can happen when some code is running on a more recent Java version and needs to communicate with an older version. In cases when new enumeration values are introduced, they won't be found in the older JVM, therefore this exception is thrown by the handling code.
The message returns the name of the enumeration that was not found.
public | EnumerationNotFoundException( Creates a new instance with the specified enum name and the IllegalArgumentException that caused it. |
public IllegalArgumentException | getCause() Gets the exception that was received when the enumeration was tried to be looked up. |
public String | Gets the enumeration name that was not found. |
Enum.valueOf
methods.null
.
The exception is directly thrown by Enum.valueOf(Enum.valueOf
methods.
Returns the cause of this throwable or null
if the cause is nonexistent or unknown.(The cause is the
throwable that caused this throwable to get thrown.)
This implementation returns the cause that was supplied via one of the constructors requiring a
Throwable
, or that was set after creation with the initCause(Throwable
. Note that it is not necessary to override any of the PrintStackTrace
methods,
all of which invoke the getCause
method to determine the cause of a throwable.
null
if the cause is nonexistent or unknown.Returns the detail message string of this throwable.
Throwable
instance (which may be null
).