Class InterruptedRuntimeException

All Implemented Interfaces:
Serializable

public class InterruptedRuntimeException extends RuntimeException
Runtime exception to signal that the current thread was interrupted.
Usually wraps a checked InterruptedException, but any cause is accepted.

Each constructor sets the interrupted flag of the current thread, so that the interrupt is not swallowed.

See Also:
  • Constructor Details

    • InterruptedRuntimeException

      public InterruptedRuntimeException()
      Constructs a new interrupted runtime exception with null as its detail message and sets the interrupted flag.
    • InterruptedRuntimeException

      public InterruptedRuntimeException(String message, Throwable cause)
      Constructs a new interrupted runtime exception with the specified detail message and cause.
      Parameters:
      message - the detail message (null allowed)
      cause - the cause (null allowed)
    • InterruptedRuntimeException

      public InterruptedRuntimeException(Throwable cause)
      Constructs a new interrupted runtime exception with the specified cause.
      Parameters:
      cause - the cause (null allowed)
    • InterruptedRuntimeException

      public InterruptedRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
      Constructs a new interrupted runtime exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
      Parameters:
      message - the detail message
      cause - the cause (null allowed)
      enableSuppression - whether suppression is enabled or disabled
      writableStackTrace - whether the stack trace should be writable