blob: f89ac6c157ad724fc4a2c05e0a27a7d8df545983 (
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
|
package org.spongycastle.tsp;
/**
* Exception thrown if a TSP request or response fails to validate.
* <p>
* If a failure code is associated with the exception it can be retrieved using
* the getFailureCode() method.
*/
public class TSPValidationException
extends TSPException
{
private int failureCode = -1;
public TSPValidationException(String message)
{
super(message);
}
public TSPValidationException(String message, int failureCode)
{
super(message);
this.failureCode = failureCode;
}
/**
* Return the failure code associated with this exception - if one is set.
*
* @return the failure code if set, -1 otherwise.
*/
public int getFailureCode()
{
return failureCode;
}
}
|