|
22 | 22 |
|
23 | 23 | package eu.webeid.ocsp.exceptions; |
24 | 24 |
|
25 | | -public class OCSPClientException extends RuntimeException { |
| 25 | +public class OCSPClientException extends Exception { |
26 | 26 |
|
27 | | - private byte[] responseBody; |
| 27 | + private final byte[] responseBody; |
28 | 28 |
|
29 | | - private Integer statusCode; |
| 29 | + private final Integer statusCode; |
30 | 30 |
|
31 | 31 | public OCSPClientException() { |
| 32 | + this(null, null); |
32 | 33 | } |
33 | 34 |
|
34 | 35 | public OCSPClientException(String message) { |
35 | | - super(message); |
| 36 | + this(message, null, null); |
36 | 37 | } |
37 | 38 |
|
38 | 39 | public OCSPClientException(Throwable cause) { |
39 | | - super(cause); |
| 40 | + this(null, cause, null, null); |
40 | 41 | } |
41 | 42 |
|
42 | 43 | public OCSPClientException(String message, Throwable cause) { |
43 | | - super(message, cause); |
| 44 | + this(message, cause, null, null); |
| 45 | + } |
| 46 | + |
| 47 | + public OCSPClientException(String message, byte[] responseBody, Integer statusCode) { |
| 48 | + this(message, null, responseBody, statusCode); |
44 | 49 | } |
45 | 50 |
|
46 | | - public OCSPClientException(String message, byte[] responseBody, int statusCode) { |
47 | | - super(message); |
| 51 | + public OCSPClientException(String message, Throwable cause, byte[] responseBody, Integer statusCode) { |
| 52 | + super(message, cause); |
48 | 53 | this.responseBody = responseBody; |
49 | 54 | this.statusCode = statusCode; |
50 | 55 | } |
|
0 commit comments