Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/spongycastle/crypto/CryptoException.java')
-rw-r--r--core/src/main/java/org/spongycastle/crypto/CryptoException.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/core/src/main/java/org/spongycastle/crypto/CryptoException.java b/core/src/main/java/org/spongycastle/crypto/CryptoException.java
new file mode 100644
index 00000000..a33adf95
--- /dev/null
+++ b/core/src/main/java/org/spongycastle/crypto/CryptoException.java
@@ -0,0 +1,48 @@
+package org.spongycastle.crypto;
+
+/**
+ * the foundation class for the hard exceptions thrown by the crypto packages.
+ */
+public class CryptoException
+ extends Exception
+{
+ private Throwable cause;
+
+ /**
+ * base constructor.
+ */
+ public CryptoException()
+ {
+ }
+
+ /**
+ * create a CryptoException with the given message.
+ *
+ * @param message the message to be carried with the exception.
+ */
+ public CryptoException(
+ String message)
+ {
+ super(message);
+ }
+
+ /**
+ * Create a CryptoException with the given message and underlying cause.
+ *
+ * @param message message describing exception.
+ * @param cause the throwable that was the underlying cause.
+ */
+ public CryptoException(
+ String message,
+ Throwable cause)
+ {
+ super(message);
+
+ this.cause = cause;
+ }
+
+ public Throwable getCause()
+ {
+ return cause;
+ }
+}