提交 | 用户 | 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 |
|
|
31 |
//@Override |
|
32 |
public int getCode() { |
|
33 |
return this.code; |
|
34 |
} |
|
35 |
} |