Class CancelledOperationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CancelledOperationException
    extends java.lang.RuntimeException
    A generic exception that can be thrown to indicate that the user has cancelled an ongoing operation. In general, this should not be thought of as an exceptional circumstance. However, it is sometimes the case that handling this case as an exception results in significantly simpler and easier-to-read code. Indicating this state using an exception can also be useful when the code must pass through a third-party API (which provides no other means to flag the state or perform appropriate cleanup).
    Since:
    3.0
    Author:
    Chris Jennings
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CancelledOperationException()
      Constructs a new exception with null as its detail message.
      CancelledOperationException​(java.lang.String message)
      Constructs a new exception with the specified message.
      CancelledOperationException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new exception with the specified message and cause.
      CancelledOperationException​(java.lang.Throwable cause)
      Constructs a new exception with a null message and the specified cause.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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
    • Constructor Detail

      • CancelledOperationException

        public CancelledOperationException()
        Constructs a new exception with null as its detail message.
      • CancelledOperationException

        public CancelledOperationException​(java.lang.String message)
        Constructs a new exception with the specified message.
        Parameters:
        message - the detail message
      • CancelledOperationException

        public CancelledOperationException​(java.lang.String message,
                                           java.lang.Throwable cause)
        Constructs a new exception with the specified message and cause.
        Parameters:
        message - the detail message
        cause - an exception that caused this exception
      • CancelledOperationException

        public CancelledOperationException​(java.lang.Throwable cause)
        Constructs a new exception with a null message and the specified cause.
        Parameters:
        cause - an exception that caused this exception