com.netflix.hystrix.util.Exceptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hystrix-core Show documentation
Show all versions of hystrix-core Show documentation
hystrix-core developed by Netflix
The 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;
}
}