Class KVException

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
KVDatabaseException

public class KVException extends RuntimeException implements Cloneable
Superclass of unchecked exceptions relating to KVStores, etc.
See Also:
  • Constructor Details

    • KVException

      public KVException()
    • KVException

      public KVException(String message)
    • KVException

      public KVException(Throwable cause)
    • KVException

      public KVException(String message, Throwable cause)
  • Method Details

    • rethrow

      public KVException rethrow()
      Rethrow this exception, which may have been created in a different thread, in the context of the current thread.

      This method ensures the current thread's stack frames are included in the thrown exception.

      This method never returns, but has a return type that can be "thrown" to facilitate source code control flow.

      Returns:
      never
      Throws:
      KVException - always, as a duplicate of this exception with the current thread's stack frame context
    • duplicate

      public KVException duplicate()
      Create a duplicate of this exception, with the current thread's stack frames prepended.

      This allows the "same" exception to be thrown multiple times from different locations with different outer stack frames. The clone() method is used to copy this instance.

      Returns:
      duplicate of this exception with the current thread's stack frame context
      See Also:
    • clone

      public KVException clone()
      Create a clone of this instance.
      Overrides:
      clone in class Object