jiazx0107
2025-09-01 ce4f9b9f72a4269a1f25812dadd59bfb92c7b3cf
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
45
46
47
48
49
50
51
52
53
54
55
package com.ld.io.api;
 
public class IoException extends RuntimeException {
    private static final long serialVersionUID = 5082773469730646183L;
    /**
     * 异常代码
     */
    private String code;
 
    /**
     * 本地化异常信息
     */
    private String localizedMessage;
 
    public IoException(String message) {
        super(message);
        this.localizedMessage = message;
    }
 
    public IoException(String code, String message) {
        super("IoServerException[" + code + "]: " + message);
        this.code = code;
        this.localizedMessage = message;
    }
 
    public IoException(String message, Throwable cause) {
        super(message, cause);
        this.localizedMessage = message;
    }
 
    public IoException(String code, String message, Throwable cause) {
        super("IoServerException[" + code + "]: " + message, cause);
        this.code = code;
        this.localizedMessage = message;
    }
 
    @Override
    public String getMessage() {
        return getLocalizedMessage();
    }
 
    @Override
    public String getLocalizedMessage() {
        return localizedMessage;
    }
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
}