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

import lombok.Getter;

@Getter
public class DataManagerException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private final String code;

    private final String message;

    public DataManagerException(DataManagerExceptionEnums dataManagerExceptionEnums) {
        super(dataManagerExceptionEnums.getValue());

        this.code = dataManagerExceptionEnums.getCode();
        this.message = dataManagerExceptionEnums.getValue();
    }

    public DataManagerException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }
}
