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

import lombok.Getter;

/**
 * 运营后台自定义错误
 * 
 * @author SunTianjun
 */
@Getter
public class OperationException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private final String code;

	private final String message;

	public OperationException(OperationErrorCodeEnums errorDefined) {
		super(errorDefined.getDesc());

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

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

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