summaryrefslogtreecommitdiff
path: root/bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java
diff options
context:
space:
mode:
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java b/bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java
index dc0ee203..2696add7 100644
--- a/bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java
+++ b/bcprov/src/main/java/org/bouncycastle/asn1/ASN1Exception.java
@@ -2,22 +2,41 @@ package org.bouncycastle.asn1;
import java.io.IOException;
+/**
+ * Exception thrown in cases of corrupted or unexpected data in a stream.
+ */
public class ASN1Exception
extends IOException
{
private Throwable cause;
+ /**
+ * Base constructor
+ *
+ * @param message a message concerning the exception.
+ */
ASN1Exception(String message)
{
super(message);
}
+ /**
+ * Constructor when this exception is due to another one.
+ *
+ * @param message a message concerning the exception.
+ * @param cause the exception that caused this exception to be thrown.
+ */
ASN1Exception(String message, Throwable cause)
{
super(message);
this.cause = cause;
}
+ /**
+ * Return the underlying cause of this exception, if any.
+ *
+ * @return the exception causing this one, null if there isn't one.
+ */
public Throwable getCause()
{
return cause;