baizonghao
2023-07-31 98b2f41e13c48219e054cf8b80c459298a01c910
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package com.mindskip.xzs.exception;
 
/**
 * @version 2.2.0
 * @description: 业务异常
 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
 * @date 2021 /9/7 9:45
 */
public class BusinessException extends RuntimeException {
 
    /**
     * The constant UNKNOWN_EXCEPTION.
     */
    public static final int UNKNOWN_EXCEPTION = 0;
 
    private int code;
 
    /**
     * Instantiates a new Business exception.
     */
    public BusinessException() {
        super();
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param message the message
     * @param cause   the cause
     */
    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param message the message
     */
    public BusinessException(String message) {
        super(message);
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param cause the cause
     */
    public BusinessException(Throwable cause) {
        super(cause);
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param code the code
     */
    public BusinessException(int code) {
        super();
        this.code = code;
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param code    the code
     * @param message the message
     * @param cause   the cause
     */
    public BusinessException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param code    the code
     * @param message the message
     */
    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
    }
 
    /**
     * Instantiates a new Business exception.
     *
     * @param code  the code
     * @param cause the cause
     */
    public BusinessException(int code, Throwable cause) {
        super(cause);
        this.code = code;
    }
 
    /**
     * Gets code.
     *
     * @return the code
     */
    public int getCode() {
        return code;
    }
 
    /**
     * Sets code.
     *
     * @param code the code
     */
    public void setCode(int code) {
        this.code = code;
    }
 
    /**
     * Is unknown boolean.
     *
     * @return the boolean
     */
    public boolean isUnknown() {
        return code == UNKNOWN_EXCEPTION;
    }
 
 
}