Skip navigation links
org.apache.myfaces.trinidad.util
Class EnumParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.myfaces.trinidad.util.EnumParseException
- All Implemented Interfaces:
- Serializable
-
public final class EnumParseException
- extends RuntimeException
Exception thrown by Enums multi-value parsing utilities to indicate that a parsing failure has occurred. This exception class offers one benefit over the standard exceptions (eg. IllegalArgumentException): it provides access to the String value that triggered the failure, which makes it possible to provide a more detailed error message to the end user.
- See Also:
Enums.parseEnumValues(java.util.Collection<java.lang.String>, java.lang.Class<E>, org.apache.myfaces.trinidad.util.Enums.EnumParser<E>, E), Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
EnumParseException
public EnumParseException(String message,
String illegalValue)
- Creates the EnumParseException
- Parameters:
message - A message describing the failure
illegalValue - the String value that could not be parsed to an Enum constant value.
getIllegalValue
public String getIllegalValue()
- Returns the String value that triggered the EnumParseException.
Skip navigation links
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.