Package org.instancio.internal.util
Class ExceptionHandler
java.lang.Object
org.instancio.internal.util.ExceptionHandler
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Optional<T>conditionalFailOnError(Supplier<T> supplier) static voidconditionalFailOnError(VoidFunction function) static voidlogException(String msg, Throwable t, Object... args) Logs exception stacktrace if trace is enabled, otherwise log exception class name and message.static voidRun the providedactionignoring theNoClassDefFoundErrorif it will be thrown.
-
Method Details
-
conditionalFailOnError
-
conditionalFailOnError
-
logException
Logs exception stacktrace if trace is enabled, otherwise log exception class name and message.- Parameters:
msg- log messaget- exception to logargs- message arguments
-
runIgnoringTheNoClassDefFoundError
Run the providedactionignoring theNoClassDefFoundErrorif it will be thrown.- Parameters:
action- the provided action
-