View Javadoc
1   package org.oxerr.chbtc;
2   
3   import java.io.IOException;
4   
5   import org.oxerr.chbtc.dto.CHBTCError;
6   
7   public class CHBTCClientException extends IOException {
8   
9   	private static final long serialVersionUID = 2013113001L;
10  
11  	private CHBTCError error;
12  
13  	public CHBTCClientException() {
14  	}
15  
16  	public CHBTCClientException(String message) {
17  		super(message);
18  	}
19  
20  	public CHBTCClientException(String message, Throwable cause) {
21  		super(message, cause);
22  	}
23  
24  	public CHBTCClientException(CHBTCError error) {
25  		super(error.getMessage());
26  		this.error = error;
27  	}
28  
29  	public CHBTCError getError() {
30  		return error;
31  	}
32  
33  	public int getErrorCode() {
34  		return error.getCode();
35  	}
36  
37  }