package cn.common.exception;

import java.io.Serializable;

import cn.common.enums.ResultCode;

/**
 * 业务异常
 */
public class BusinessException extends Exception implements Serializable
{
    private static final long serialVersionUID = 4843777456195536990L;

    /**
     * 异常编号
     */
    private Integer code;

    /**
     * 异常信息
     */
    private String msg;

    public BusinessException(String msg) {
        this.msg = msg;
        this.code = ResultCode.HTTP_ERROR_500.getCode();
    }

    public Integer getCode() {
        return code;
    }

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

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}