package com.dayou.exception;

/**
 * 业务异常
 *
 * @author lq
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    protected final String message;

    protected Integer code;


    public BusinessException(String message) {
        this.message = message;
    }

    public BusinessException(String message, String code) {
        this.message = message;
        this.code = Integer.valueOf(code);
    }

    public BusinessException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

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

    public Integer getCode() {
        return code;
    }
}
