Class ExceptionContainer<E extends java.lang.Exception>
- java.lang.Object
-
- org.eclipse.epsilon.common.function.ExceptionContainer<E>
-
- Type Parameters:
E
- The type of the exception.
public class ExceptionContainer<E extends java.lang.Exception> extends java.lang.Object
Utility class for wrapping an exception, which is useful for exception-handling in commonly used lambda expressions where checked exceptions can't be thrown and variables outside the scope can't be assigned due to "effectively final" requirement.- Since:
- 1.6
- Author:
- Sina Madani
-
-
Constructor Summary
Constructors Constructor Description ExceptionContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
getException()
boolean
hasException()
void
setException(E ex)
void
throwIfPresent()
-