Package com.github.toolarium.common.util
Interface ExceptionWrapper.ExceptionHandler
- All Known Implementing Classes:
ExceptionWrapper.DefaultExceptionHandler
- Enclosing class:
ExceptionWrapper
public static interface ExceptionWrapper.ExceptionHandler
Defines the exception handler API
-
Method Summary
Modifier and TypeMethodDescription<T extends Throwable>
TcreateExceptionInstance(Throwable t, Class<T> newExceptionClazz) Creates the new exception
-
Method Details
-
createExceptionInstance
<T extends Throwable> T createExceptionInstance(Throwable t, Class<T> newExceptionClazz) throws InstantiationException, IllegalAccessException, InvocationTargetException Creates the new exception- Type Parameters:
T- the generic type- Parameters:
t- the current exceptionnewExceptionClazz- the new exception class- Returns:
- the new instance
- Throws:
InstantiationException- in case of errorIllegalAccessException- in case of errorInvocationTargetException- in case of error
-