shikeying
2024-01-11 3b67e947e36133e2a40eb2737b15ea375e157ea0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.walker.web;
 
import com.walker.infrastructure.ApplicationException;
 
/**
 * Token 解析异常定义:
 * <p>
 *     1.密钥错误
 *     2.过期
 * </p>
 */
public class TokenException extends ApplicationException {
 
    private String title;
 
    private boolean expired = false;
 
    public TokenException(String msg){
        super(msg);
        this.title = msg;
    }
 
    public TokenException(String msg, Throwable cause, boolean expired){
        super(msg, cause);
        this.expired = expired;
    }
 
    public TokenException(String msg, Throwable cause){
        super(msg, cause);
        this.title = msg;
    }
 
    public String getTitle(){
        return this.title;
    }
 
    public boolean isExpired() {
        return expired;
    }
}