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

com.netflix.hystrix.util.Exceptions Maven / Gradle / Ivy

There is a newer version: 1.5.18
Show newest version
package com.netflix.hystrix.util;

import java.util.LinkedList;
import java.util.List;

public class Exceptions {
    private Exceptions() {
    }

    /**
     * Throws the argument, return-type is RuntimeException so the caller can use a throw statement break out of the method
     */
    public static RuntimeException sneakyThrow(Throwable t) {
        return Exceptions.doThrow(t);
    }

    private static  T doThrow(Throwable ex) throws T {
        throw (T) ex;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy