package cn.freemud.interceptor;

import cn.freemud.enums.ResponseResult;
import com.freemud.application.sdk.api.exception.IgnoreErrorAnnotation;

/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @Title: cn.freemud.interceptor BizServiceException
 * @Description: TDO 描述....
 * @author: family
 * @date: 2020/6/11
 * @Copyright: www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */
@SuppressWarnings("serial")
@IgnoreErrorAnnotation
public class BizServiceException extends RuntimeException {
    private ResponseResult result;

    private String message;

    public BizServiceException(ResponseResult result) {
        this.result = result;
        this.message = result.getMessage();
    }

    public BizServiceException(ResponseResult result, String message) {
        this.result = result;
        this.message = message;
    }

    public ResponseResult getResult() {
        return result;
    }

    public void setResult(ResponseResult result) {
        this.result = result;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
