ur_rna.Utilities

## Class ExtensibleException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - ur_rna.Utilities.ExtensibleException

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    GuiItemNotFoundException, ScriptRuntimeException

      public class ExtensibleException
      extends java.lang.Exception

  Exception that allows additional details to be added.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.HashMap<java.lang.String,java.io.Serializable>` | `data`
    `protected java.util.Map<java.lang.String,java.io.Serializable>` | `readOnlyData`
    `private static long` | `serialVersionUID`
    `protected java.lang.String` | `updatedMessage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtensibleException()`
    `ExtensibleException(java.lang.String message)`
    `ExtensibleException(java.lang.String message, java.lang.Throwable cause)`
    `ExtensibleException(java.lang.Throwable cause)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,java.io.Serializable>` | `getData()`
    `java.io.Serializable` | `getData(java.lang.String key)` Returns the value stored in the data table for the specified key if it exists, or null otherwise.
    `java.io.Serializable` | `getData(java.lang.String key, java.io.Serializable defaultValue)` Returns the value stored in the data table for the specified key if it exists, or defaultValue otherwise.
    `java.lang.String` | `getMessage()` If a new message has been stored (using `setMessage`) this will return the new message.
    `java.lang.String` | `getOriginalMessage()` This returns the original message passed in the constructor (to Throwable).
    `ExtensibleException` | `putData(java.lang.String key, java.io.Serializable value)`
    `ExtensibleException` | `putData(java.lang.String key, java.io.Serializable value, boolean overwrite)`
    `void` | `resetMessage()` If a new message has been stored (using `setMessage`) this will revert the message back to the original (passed in the constructor.)
    `void` | `setMessage(java.lang.String value)` Allows the calling code to update the message stored in this exception.

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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`

- - ### Field Detail

    - #### data

          protected java.util.HashMap<java.lang.String,java.io.Serializable> data

    - #### readOnlyData

          protected java.util.Map<java.lang.String,java.io.Serializable> readOnlyData

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

    - #### updatedMessage

          protected java.lang.String updatedMessage

  - ### Constructor Detail

    - #### ExtensibleException

          public ExtensibleException()

    - #### ExtensibleException

          public ExtensibleException(java.lang.String message)

    - #### ExtensibleException

          public ExtensibleException(java.lang.String message,
                                     java.lang.Throwable cause)

    - #### ExtensibleException

          public ExtensibleException(java.lang.Throwable cause)

  - ### Method Detail

    - #### getData

          public java.util.Map<java.lang.String,java.io.Serializable> getData()

    - #### getData

          public java.io.Serializable getData(java.lang.String key)

      Returns the value stored in the data table for the specified key if it exists, or null otherwise.

    - #### getData

          public java.io.Serializable getData(java.lang.String key,
                                              java.io.Serializable defaultValue)

      Returns the value stored in the data table for the specified key if it exists, or defaultValue otherwise.

    - #### getMessage

          public java.lang.String getMessage()

      If a new message has been stored (using `setMessage`) this will return the new message. Otherwise, the result is the same as calling `Throwable.getMessage()`
      Overrides:
        `getMessage` in class `java.lang.Throwable`

    - #### getOriginalMessage

          public java.lang.String getOriginalMessage()

      This returns the original message passed in the constructor (to Throwable). This will only differ from getMessage if `setMessage` has been used to store an updated message.

    - #### putData

          public ExtensibleException putData(java.lang.String key,
                                             java.io.Serializable value)

    - #### putData

          public ExtensibleException putData(java.lang.String key,
                                             java.io.Serializable value,
                                             boolean overwrite)

    - #### resetMessage

          public void resetMessage()

      If a new message has been stored (using `setMessage`) this will revert the message back to the original (passed in the constructor.)

    - #### setMessage

          public void setMessage(java.lang.String value)

      Allows the calling code to update the message stored in this exception.
      Parameters:
        `value` - The new message.