提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.data.common.exception; |
H |
2 |
|
|
3 |
/** |
|
4 |
* 自定义异常 |
|
5 |
* |
|
6 |
* @author Mark sunlightcs@gmail.com |
|
7 |
*/ |
|
8 |
public class RRException extends RuntimeException { |
|
9 |
private static final long serialVersionUID = 1L; |
|
10 |
|
|
11 |
private String msg; |
|
12 |
private int code = 500; |
|
13 |
|
|
14 |
public RRException(String msg) { |
|
15 |
super(msg); |
|
16 |
this.msg = msg; |
|
17 |
} |
|
18 |
|
|
19 |
public RRException(String msg, Throwable e) { |
|
20 |
super(msg, e); |
|
21 |
this.msg = msg; |
|
22 |
} |
|
23 |
|
|
24 |
public RRException(String msg, int code) { |
|
25 |
super(msg); |
|
26 |
this.msg = msg; |
|
27 |
this.code = code; |
|
28 |
} |
|
29 |
|
|
30 |
public RRException(String msg, int code, Throwable e) { |
|
31 |
super(msg, e); |
|
32 |
this.msg = msg; |
|
33 |
this.code = code; |
|
34 |
} |
|
35 |
|
|
36 |
public String getMsg() { |
|
37 |
return msg; |
|
38 |
} |
|
39 |
|
|
40 |
public void setMsg(String msg) { |
|
41 |
this.msg = msg; |
|
42 |
} |
|
43 |
|
|
44 |
public int getCode() { |
|
45 |
return code; |
|
46 |
} |
|
47 |
|
|
48 |
public void setCode(int code) { |
|
49 |
this.code = code; |
|
50 |
} |
|
51 |
|
|
52 |
|
|
53 |
} |