Package com.algolia.search.exceptions
Class LaunderThrowable
- java.lang.Object
-
- com.algolia.search.exceptions.LaunderThrowable
-
public class LaunderThrowable extends Object
-
-
Constructor Summary
Constructors Constructor Description LaunderThrowable()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tawait(CompletableFuture<T> f)Performs a get() on the asynchronous method.static RuntimeExceptionlaunder(Throwable t)Launders both Interrupted and Execution exception into business exception
-
-
-
Method Detail
-
await
public static <T> T await(CompletableFuture<T> f)
Performs a get() on the asynchronous method. Launders both Interrupted and Execution exception to business exception- Parameters:
f- The CompletableFuture to block on.
-
launder
public static RuntimeException launder(Throwable t)
Launders both Interrupted and Execution exception into business exception
-
-