public class KVException extends RuntimeException implements Cloneable
KVStore
s, etc.Constructor and Description |
---|
KVException() |
KVException(String message) |
KVException(String message,
Throwable cause) |
KVException(Throwable cause) |
Modifier and Type | Method and Description |
---|---|
KVException |
clone()
Create a clone of this instance.
|
KVException |
duplicate()
Create a duplicate of this exception, with the current thread's stack frames prepended.
|
KVException |
rethrow()
Rethrow this exception, which may have been created in a different thread, in the context of the current thread.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public KVException()
public KVException(String message)
public KVException(Throwable cause)
public KVException rethrow()
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.
KVException
- always, as a duplicate of this exception with the current thread's stack frame contextpublic KVException duplicate()
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.
ThrowableUtil.prependCurrentStackTrace(java.lang.Throwable)
public KVException clone()
Copyright © 2022. All rights reserved.