package cn.freemud.interceptor;

import cn.freemud.enums.ResponseResult;

/**
 * 自定义参数校验异常
 * message 错误信息
 */
@SuppressWarnings("serial")
public class ParameterException extends RuntimeException {

    private ResponseResult result;

    private String message;

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

    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;
    }
}
