Package bm.util
Interface RunOrThrow
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A runnable which may throw a
BuildProblemException.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRunOrThrow.RoT<E extends Exception>A Runnable which may throw any type ofException. -
Method Summary
Modifier and TypeMethodDescriptionstatic <EX extends Exception>
RunOrThrowof(RunOrThrow.RoT<EX> rot) Creates a runnable to convert an arbitraryExceptionthrown to aBuildProblemException.voidrun()
-
Method Details
-
run
- Throws:
BuildProblemException
-
of
Creates a runnable to convert an arbitraryExceptionthrown to aBuildProblemException.- Type Parameters:
EX- the exception type to wrap- Parameters:
rot- the consumer throwing an arbitrary exception- Returns:
- a consumer to only throw a
BuildProblemException
-