MCPcopy Create free account
hub / github.com/LisenCoding/cangku / EIException

Class EIException

boot/src/main/java/com/entity/EIException.java:7–52  ·  view source on GitHub ↗

自定义异常

Source from the content-addressed store, hash-verified

5 * 自定义异常
6 */
7public class EIException extends RuntimeException {
8 private static final long serialVersionUID = 1L;
9
10 private String msg;
11 private int code = 500;
12
13 public EIException(String msg) {
14 super(msg);
15 this.msg = msg;
16 }
17
18 public EIException(String msg, Throwable e) {
19 super(msg, e);
20 this.msg = msg;
21 }
22
23 public EIException(String msg, int code) {
24 super(msg);
25 this.msg = msg;
26 this.code = code;
27 }
28
29 public EIException(String msg, int code, Throwable e) {
30 super(msg, e);
31 this.msg = msg;
32 this.code = code;
33 }
34
35 public String getMsg() {
36 return msg;
37 }
38
39 public void setMsg(String msg) {
40 this.msg = msg;
41 }
42
43 public int getCode() {
44 return code;
45 }
46
47 public void setCode(int code) {
48 this.code = code;
49 }
50
51
52}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected