Package org.jobrunr.utils.exceptions
Class Exceptions
- java.lang.Object
-
- org.jobrunr.utils.exceptions.Exceptions
-
public class Exceptions extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Exceptions.ThrowingBiConsumer<T,U>
static interface
Exceptions.ThrowingBiFunction<T,U,R>
static interface
Exceptions.ThrowingConsumer<T>
static interface
Exceptions.ThrowingFunction<T,R>
static interface
Exceptions.ThrowingRunnable
static interface
Exceptions.ThrowingSupplier<T>
-
Constructor Summary
Constructors Constructor Description Exceptions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getStackTraceAsString(java.lang.Throwable exception)
static boolean
hasCause(java.lang.Throwable t, java.lang.Class<? extends java.lang.Throwable> exceptionClass)
static <T> T
retryOnException(java.util.function.Supplier<T> supplier, int maxRetries)
-
-
-
Method Detail
-
hasCause
public static boolean hasCause(java.lang.Throwable t, java.lang.Class<? extends java.lang.Throwable> exceptionClass)
-
getStackTraceAsString
public static java.lang.String getStackTraceAsString(java.lang.Throwable exception)
-
retryOnException
public static <T> T retryOnException(java.util.function.Supplier<T> supplier, int maxRetries)
-
-