package com.ks.lib.common.exception; public class BaseException extends Exception { //已经存在 public final static int CODE_EXIST = 10001; //不存在 public final static int CODE_NOT_EXIST = 10002; //参数不完整 public final static int CODE_PARAMS_NOT_ENOUGH = 10003; //权限不足 public final static int CODE_NO_AUTHORITY = 10010; //权限不足 public final static int CODE_BUSY = 90000; private static final long serialVersionUID = 1L; private int code; private String msg; public int getCode() { return code; } public String getMsg() { return msg; } public BaseException(int code, String msg) { this.code = code; this.msg = msg; } public BaseException(String msg) { this.msg = msg; } public BaseException() { } @Override public String getMessage() { return this.msg; } }