Helius
2020-06-29 1598aa79d68143f73c1b406f463c55e5e5d02433
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
package com.xcong.excoin.utils.api;
 
/**
 * ApiException if api returns error.
 *
 * @Date 2018/1/14
 * @Time 16:02
 */
 
public class ApiException extends RuntimeException {
 
    /**
     * 
     */
    private static final long serialVersionUID = 8196662756375909063L;
    
    final String errCode;
 
    public ApiException(String errCode, String errMsg) {
        super(errMsg);
        this.errCode = errCode;
    }
 
    public ApiException(Exception e) {
        super(e);
        this.errCode = e.getClass().getName();
    }
 
    public String getErrCode() {
        return this.errCode;
    }
 
}