Class FastUnsupportedCallbackException

All Implemented Interfaces:
Serializable

public class FastUnsupportedCallbackException extends UnsupportedCallbackException
A version of UnsupportedCallbackException which does not initialize a full stack trace, and thus is much more efficient to construct.
Author:
David M. Lloyd
See Also:
  • Constructor Details

    • FastUnsupportedCallbackException

      public FastUnsupportedCallbackException(Callback callback)
      Constructs a new FastUnsupportedCallbackException instance. The message is left blank (null), and no cause is specified.
      Parameters:
      callback - the callback which is not supported (should not be null)
    • FastUnsupportedCallbackException

      public FastUnsupportedCallbackException(Callback callback, String msg)
      Constructs a new FastUnsupportedCallbackException instance with an initial message. No cause is specified.
      Parameters:
      callback - the callback which is not supported (should not be null)
      msg - the message
  • Method Details

    • initCause

      public Throwable initCause(Throwable cause)
      Does nothing but return this instance.
      Overrides:
      initCause in class Throwable
      Parameters:
      cause - ignored
      Returns:
      this instance
    • getStackTrace

      public StackTraceElement[] getStackTrace()
      Returns an empty stack.
      Overrides:
      getStackTrace in class Throwable
      Returns:
      an empty stack
    • fillInStackTrace

      public Throwable fillInStackTrace()
      Does nothing but return this instance.
      Overrides:
      fillInStackTrace in class Throwable
      Returns:
      this instance
    • setStackTrace

      public void setStackTrace(StackTraceElement[] stackTrace)
      Does nothing.
      Overrides:
      setStackTrace in class Throwable
      Parameters:
      stackTrace - ignored
    • getMessage

      public String getMessage()
      Get the message for this exception, formatted with the callback.
      Overrides:
      getMessage in class Throwable
      Returns:
      the message for this exception, with the callback (not null)