package com.tiesheng.util.exception;

import com.tiesheng.util.pojos.ApiResp;

/**
 * @author huang
 * @ProjectName health
 * @Copyright Hangzhou ShuoChuang Technology Co.,Ltd All Right Reserved
 * @Description 这里是对文件的描述
 * @data 2017/8/8
 * @note 这里写文件的详细功能和改动
 * @note
 */
public class ApiException extends RuntimeException {

    private ApiResp<String> apiResp;

    public ApiException(String message) {
        super(message);
        this.apiResp = ApiResp.respCust(102, message);
    }

    public ApiException(int code, String message) {
        this.apiResp = ApiResp.respCust(code, message);
    }

    public ApiException(ApiResp<String> apiResp) {
        this.apiResp = apiResp;
    }

    public ApiResp<String> getApiResp() {
        return apiResp;
    }
}
