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

org.yamcs.utils.ExceptionUtil Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
package org.yamcs.utils;

import java.util.concurrent.CompletionException;
import java.util.concurrent.ExecutionException;

import com.google.common.util.concurrent.UncheckedExecutionException;

public class ExceptionUtil {
    public static Throwable unwind(Throwable t) {
        while (((t instanceof ExecutionException) || (t instanceof CompletionException) || (t instanceof UncheckedExecutionException))
                && t.getCause() != null) {
            t = t.getCause();
        }
        return t;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy