Class StackSuppressedRuntimeException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CancelDebuggingListenableFuture.FutureProcessingStack, ExceptionUtils.TransformedSuppressedStackException

    public class StackSuppressedRuntimeException
    extends java.lang.RuntimeException
    Type of RuntimeException which does not generate a stack at it's point of creation. Generating a stack trace in java is very expensive, and does not always further the understanding of the type of error (particularly when the exception is wrapping another exception, or is a communication of state). In those select conditions using or extending this type of exception can provide a significant performance gain.
    Since:
    5.39 (Existed since 4.8 as SuppressedStackRuntimeException)
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable fillInStackTrace()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StackSuppressedRuntimeException

        public StackSuppressedRuntimeException()
        Construct a new exception with no message or cause. The cause is not initialized, and may subsequently be initialized by invoking Throwable.initCause(java.lang.Throwable).
      • StackSuppressedRuntimeException

        public StackSuppressedRuntimeException​(java.lang.String msg)
        Construct a new exception with a provided message and no cause.
        Parameters:
        msg - The message which can later be retrieved by Throwable.getMessage()
      • StackSuppressedRuntimeException

        public StackSuppressedRuntimeException​(java.lang.Throwable cause)
        Construct a new exception with a provided cause. The message will be defaulted from the cause provided.
        Parameters:
        cause - The cause which contributed to this exception
      • StackSuppressedRuntimeException

        public StackSuppressedRuntimeException​(java.lang.String msg,
                                               java.lang.Throwable cause)
        Construct a new exception providing both a unique message and cause.
        Parameters:
        msg - The message which can later be retrieved by Throwable.getMessage()
        cause - The cause which contributed to this exception
    • Method Detail

      • fillInStackTrace

        public java.lang.Throwable fillInStackTrace()
        Overrides:
        fillInStackTrace in class java.lang.Throwable