package com.ghb.base.common.exception;

import com.ghb.base.common.constant.CommonConstant;

/**
 * @Description: Ghb-boot自定义异常
 * @author: Ghb-boot
 */
public class GhbBootException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	/**
	 * 返回给前端的错误code
	 */
	private int errCode = CommonConstant.SC_INTERNAL_SERVER_ERROR_500;

	public GhbBootException(String message){
		super(message);
	}

	public GhbBootException(String message, int errCode){
		super(message);
		this.errCode = errCode;
	}

	public int getErrCode() {
		return errCode;
	}

	public GhbBootException(Throwable cause)
	{
		super(cause);
	}
	
	public GhbBootException(String message,Throwable cause)
	{
		super(message,cause);
	}
}
