package com.moral.exception; 
 | 
  
 | 
/** 
 | 
 * @ClassName TokenException 
 | 
 * @Description Token异常 
 | 
 * @Author 陈凯裕 
 | 
 * @Date 2021/3/11 14:54 
 | 
 * @Version TODO 
 | 
 **/ 
 | 
public class TokenException extends RuntimeException { 
 | 
  
 | 
    /** 
 | 
     * 错误码 
 | 
     */ 
 | 
    private int code; 
 | 
  
 | 
    /** 
 | 
     * 错误信息 
 | 
     */ 
 | 
    private String msg; 
 | 
  
 | 
    /**  */ 
 | 
    private static final long serialVersionUID = 1L; 
 | 
  
 | 
    public TokenException() { 
 | 
        super(); 
 | 
    } 
 | 
  
 | 
    public TokenException(String msg) { 
 | 
        super(msg); 
 | 
        this.msg = msg; 
 | 
    } 
 | 
  
 | 
    public TokenException(Throwable t) { 
 | 
        super(t); 
 | 
    } 
 | 
  
 | 
    public TokenException(String msg, Throwable t) { 
 | 
        super(msg); 
 | 
        this.msg = msg; 
 | 
    } 
 | 
  
 | 
    public TokenException(int code, String msg) { 
 | 
        super(msg); 
 | 
        this.code = code; 
 | 
        this.msg = msg; 
 | 
    } 
 | 
  
 | 
    public TokenException(int code, String msg, Throwable t) { 
 | 
        super(msg, t); 
 | 
        this.code = code; 
 | 
        this.msg = msg; 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * Getter method for property <tt>code</tt>. 
 | 
     * 
 | 
     * @return property value of code 
 | 
     */ 
 | 
    public int getCode() { 
 | 
        return code; 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * Getter method for property <tt>msg</tt>. 
 | 
     * 
 | 
     * @return property value of msg 
 | 
     */ 
 | 
    public String getMsg() { 
 | 
        return msg; 
 | 
    } 
 | 
} 
 |