blob: 2696add71314d44a1db383bae99cb52c64fdc0ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
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;
}
}
|