提交 | 用户 | age
|
826b66
|
1 |
package com.hx.exception; |
C |
2 |
|
|
3 |
/** |
|
4 |
* 登录提示异常 |
|
5 |
* @author ChenJiaHe |
|
6 |
* @Date 2020-11-17 |
|
7 |
*/ |
|
8 |
public class LoginException extends RuntimeException { |
|
9 |
|
|
10 |
private Integer code; |
|
11 |
|
|
12 |
public LoginException(String message) { |
|
13 |
super(message); |
|
14 |
} |
|
15 |
|
|
16 |
public LoginException(String message, Integer code) { |
|
17 |
super(message); |
|
18 |
this.code = code; |
|
19 |
} |
|
20 |
|
|
21 |
public LoginException(String message, Throwable cause, Integer code) { |
|
22 |
super(message, cause); |
|
23 |
this.code = code; |
|
24 |
} |
|
25 |
|
|
26 |
public LoginException(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 |
} |