提交 | 用户 | age
|
5c5945
|
1 |
package com.hx.exception; |
E |
2 |
|
|
3 |
/** |
|
4 |
* 前端提示异常 |
|
5 |
* @author ChenJiaHe |
|
6 |
* @Date 2020-06-19 |
|
7 |
*/ |
|
8 |
public class TipsException extends RuntimeException { |
|
9 |
|
|
10 |
private Integer code; |
|
11 |
|
|
12 |
public TipsException(String message) { |
|
13 |
super(message); |
|
14 |
} |
|
15 |
|
|
16 |
public TipsException(String message, Integer code) { |
|
17 |
super(message); |
|
18 |
this.code = code; |
|
19 |
} |
|
20 |
|
|
21 |
public TipsException(String message, Throwable cause, Integer code) { |
|
22 |
super(message, cause); |
|
23 |
this.code = code; |
|
24 |
} |
|
25 |
|
|
26 |
public TipsException(Throwable cause, Integer code) { |
|
27 |
super(cause); |
|
28 |
this.code = code; |
|
29 |
} |
|
30 |
|
7a86d3
|
31 |
public Integer getCode() { |
C |
32 |
return code; |
|
33 |
} |
|
34 |
|
|
35 |
public void setCode(Integer code) { |
|
36 |
this.code = code; |
5c5945
|
37 |
} |
E |
38 |
} |