package org.springblade.openapi.wps.exception;

import lombok.Getter;
import org.springblade.openapi.wps.pojo.enums.Api4WpsError;

/**
 *  wps回调接口异常
 * @author bfhuange
 * @since 2024/11/26
 */
@Getter
public class Api4WpsException extends RuntimeException {

    /**
     *  错误枚举
     */
    private final Api4WpsError error;
    /**
     *  消息
     */
    private final String message;

    public Api4WpsException(Api4WpsError error) {
        super(error.getMessage());
        this.error = error;
        this.message = error.getMessage();
    }

    public Api4WpsException(Api4WpsError error, String message) {
        super(message);
        this.error = error;
        this.message = message;
    }
}
