Class StaticException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.jetty.util.StaticException
All Implemented Interfaces:
Serializable

public class StaticException extends Exception
This exception can safely be stored in a static variable as suppressed exceptions are disabled, meaning calling Throwable.addSuppressed(Throwable) has no effect. This prevents potential memory leaks where a statically-stored exception would accumulate suppressed exceptions added to them.
See Also:
  • Constructor Details

    • StaticException

      public StaticException(String message)
      Create an instance with writable stack trace and suppression disabled.
      Parameters:
      message - – the detail message
      See Also:
    • StaticException

      public StaticException(String message, boolean writableStackTrace)
      Create an instance with suppression disabled.
      Parameters:
      message - – the detail message
      writableStackTrace - whether or not the stack trace should be writable
      See Also: