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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnumParseException(String message, String illegalValue)` Creates the EnumParseException

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getIllegalValue()` Returns the String value that triggered the EnumParseException.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### 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.

  - ### Method Detail

    - #### getIllegalValue

          public String getIllegalValue()

      Returns the String value that triggered the EnumParseException.

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.