package com.yeejoin.amos.boot.module.common.biz.utils;


import java.io.Serializable;

import com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum;
/**
 * 自定义异常处理类
 * @author chenhao
 *
 */
public class MyException extends Exception implements Serializable{
     
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private ExceptionEnum exceptionEnum;
	
	private String detail;
	
	protected String devMessage;
	
	public MyException(ExceptionEnum exceptionEnum, String detail) {
		this.exceptionEnum =exceptionEnum;
		this.detail= detail;
		this.devMessage=getDevMessage();
	}
	
	public MyException(ExceptionEnum exceptionEnum) {
		this.exceptionEnum =exceptionEnum;
		this.devMessage=getDevMessage();
	}
	
	public ExceptionEnum getExceptionEnum() {
		return exceptionEnum;
	}
	
	public void setExceptionEnum(ExceptionEnum exceptionEnum) {
		this.exceptionEnum = exceptionEnum;
	}
	
	public String getDetail() {
		return detail;
	}
	
	public void setDetail(String detail) {
		this.detail = detail;
	}
	
	public String getDevMessage() {
		return "error";
	}
	
	public void setDevMessage(String devMessage) {
		this.devMessage = devMessage;
	}
	
}
