package com.yc.exception; import org.springframework.dao.DataAccessException; /** * 系统程序定义的异常类 * * **/ public class ApplicationException extends RuntimeException { private static final long serialVersionUID = -4894578647436746036L; private int errorCode; public ApplicationException(String msg){ super(msg); } public ApplicationException(String msg,Throwable cause){ super(msg,cause); } public ApplicationException(String msg,int errorCode){ super(msg); this.errorCode=errorCode; } public void setCode(int code) { this.errorCode = code; } public int getCode() { return errorCode; } }