All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.mentegy.s3.channels.util.ExceptionUtils Maven / Gradle / Ivy

The newest version!
package io.github.mentegy.s3.channels.util;

import java.util.concurrent.ExecutionException;

public final class ExceptionUtils {

    public static RuntimeException mapExecutionException(Exception e) {
        if (e instanceof ExecutionException &&
                e.getCause() != null &&
                e.getCause() instanceof RuntimeException) {
            throw (RuntimeException) e.getCause();
        } else {
            throw new RuntimeException(e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy