xinyb
10 天以前 658898d28cded745ca15ee0a89e3025358356259
提交 | 用户 | age
a6a76f 1 package com.yc.exception;
F 2
3 import org.springframework.dao.DataAccessException;
4
5 /**
6  * 系统程序定义的异常类
7  * 
8  * **/
9 public class ApplicationException extends  RuntimeException  {
10     private static final long serialVersionUID = -4894578647436746036L;
11 private int errorCode;
12 public     ApplicationException(String msg){
13     super(msg);
14 }
15 public     ApplicationException(String msg,Throwable cause){
16     super(msg,cause);
17 }
18 public     ApplicationException(String msg,int errorCode){
19     super(msg);
20     this.errorCode=errorCode;
21 }
22
23     public void setCode(int code) {
24         this.errorCode = code;
25     }
26
27     public int getCode() {
28         return errorCode;
29     }
30 }