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

import lombok.Getter;

@Getter
public class YException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private final String code;

	private final String message;

	public YException(YExceptionEnum exceptionEnum) {
		super(exceptionEnum.getDesc());

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

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

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