提交 | 用户 | 时间
|
1178da
|
1 |
package com.iailab.module.model.common.exception; |
D |
2 |
|
|
3 |
/** |
|
4 |
* 模型结果错误异常 |
|
5 |
*/ |
|
6 |
public class ModelResultErrorException extends RuntimeException { |
|
7 |
private static final long serialVersionUID = 1L; |
|
8 |
|
|
9 |
private String msg; |
|
10 |
private int code = 200; |
|
11 |
|
|
12 |
public ModelResultErrorException(String msg) { |
|
13 |
super(msg); |
|
14 |
this.msg = msg; |
|
15 |
} |
|
16 |
|
|
17 |
public ModelResultErrorException(String msg, Throwable e) { |
|
18 |
super(msg, e); |
|
19 |
this.msg = msg; |
|
20 |
} |
|
21 |
|
|
22 |
public ModelResultErrorException(String msg, int code) { |
|
23 |
super(msg); |
|
24 |
this.msg = msg; |
|
25 |
this.code = code; |
|
26 |
} |
|
27 |
|
|
28 |
public ModelResultErrorException(String msg, int code, Throwable e) { |
|
29 |
super(msg, e); |
|
30 |
this.msg = msg; |
|
31 |
this.code = code; |
|
32 |
} |
|
33 |
|
|
34 |
public String getMsg() { |
|
35 |
return msg; |
|
36 |
} |
|
37 |
|
|
38 |
public void setMsg(String msg) { |
|
39 |
this.msg = msg; |
|
40 |
} |
|
41 |
|
|
42 |
public int getCode() { |
|
43 |
return code; |
|
44 |
} |
|
45 |
|
|
46 |
public void setCode(int code) { |
|
47 |
this.code = code; |
|
48 |
} |
|
49 |
|
|
50 |
|
|
51 |
} |