package com.yh.saas.plugin.configuration.exception;

import lombok.Getter;

/**
 * 管理后台自定义错误
 * 
 * @author SunTianjun
 */
@Getter
public class EnterpriseException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private final String code;

	private final String message;

	public EnterpriseException(EnterpriseErrorCodeEnums errorDefined) {
		super(errorDefined.getDesc());

		this.code = errorDefined.getValue();
		this.message = errorDefined.getDesc();
	}

	public EnterpriseException(String code, String message) {
		super(message);

		this.code = code;
		this.message = message;
	}
}
