package com.younike.common.exception;


import com.younike.common.bean.ApiResultCode;

/**
 * @author OldMa
 * @version 1.0.0
 * @ClassName ApiResultCode.java
 * @Description TODO
 * @createTime 2021年06月10日 13:45:00
 */
public class ApiException extends RuntimeException {

	/**
	 *
	 */
	private static final long serialVersionUID = -546545554545484512L;

	private Integer code;

	/**
     *
     */
    public ApiException(){
        super();
    }

    /**
     *
     * @param message
     */
    public ApiException(String message){
    	super(message);
    	this.code = ApiResultCode.Fail.getCode();
    }

    /**
     *
     * @param code
     * @param message
     */
    public ApiException(Integer code, String message){
    	super(message);
    	this.code = code;
    }

    public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
