Package net.corda.v5.crypto.exceptions
Class CryptoException
-
- All Implemented Interfaces:
-
java.io.Serializable
,net.corda.v5.base.exceptions.CordaThrowable
public class CryptoException extends CordaRuntimeException
Base exception for all Crypto Library specific exception. Note that the library may throw common exceptions such as IllegalArgumentException, IllegalStateException and others as well. This base class is only for the specific cases when a site throwing exception can provide some useful context about the operation.
NOTE: The approach for the Crypto Library is to use the existing exception where appropriate and use the specific Crypto Library exceptions only to convey additional context about the conditions which lead to the exception.
-
-
Field Summary
Fields Modifier and Type Field Description public final boolean
isRecoverable
public String
originalExceptionClassName
public Throwable
cause
public Array<StackTraceElement>
stackTrace
-
Constructor Summary
Constructors Constructor Description CryptoException(String message)
Constructs a new exception with the specified detail message. CryptoException(String message, boolean isRecoverable)
Constructs a new exception with the specified detail message and when it's recoverable. CryptoException(String message, Throwable cause)
Constructs a new exception with the specified detail message and cause. CryptoException(String message, boolean isRecoverable, Throwable cause)
Constructs a new exception with the specified detail message, cause, and when it's recoverable.
-
Method Summary
Modifier and Type Method Description final boolean
isRecoverable()
If the value is true, then the error condition is considered transient and the operation which throws such exceptions can be retried. -
Methods inherited from class net.corda.v5.base.exceptions.CordaRuntimeException
addSuppressed, equals, getCause, getMessage, getOriginalExceptionClassName, getOriginalMessage, hashCode, setCause, setMessage, setOriginalExceptionClassName
-
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CryptoException
CryptoException(String message)
Constructs a new exception with the specified detail message.- Parameters:
message
- The detailed message.
-
CryptoException
CryptoException(String message, boolean isRecoverable)
Constructs a new exception with the specified detail message and when it's recoverable.- Parameters:
message
- The detailed message.isRecoverable
- The flag specifying whenever the operation throwing the exception could be retried without any intervention by application-level functionality.
-
CryptoException
CryptoException(String message, Throwable cause)
Constructs a new exception with the specified detail message and cause.- Parameters:
message
- The detailed message.cause
- The cause.
-
CryptoException
CryptoException(String message, boolean isRecoverable, Throwable cause)
Constructs a new exception with the specified detail message, cause, and when it's recoverable.- Parameters:
message
- The detailed message.isRecoverable
- The flag specifying whenever the operation throwing the exception could be retried without any intervention by application-level functionality.cause
- The cause.
-
-
Method Detail
-
isRecoverable
final boolean isRecoverable()
If the value is true, then the error condition is considered transient and the operation which throws such exceptions can be retried.
-
-
-
-