Package com.mscharhag.et.impl
Class DefaultExceptionTranslator
java.lang.Object
com.mscharhag.et.impl.DefaultExceptionTranslator
- All Implemented Interfaces:
ExceptionTranslator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RuntimeExceptiongetTargetException(Exception source) <T> Treturns(ReturningTryBlock<T> invokable) voidThis swallows any exceptions.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mscharhag.et.ExceptionTranslator
withReturningTranslation, withTranslation
-
Field Details
-
exceptionMappings
-
-
Constructor Details
-
DefaultExceptionTranslator
DefaultExceptionTranslator(ExceptionMappings exceptionMappings)
-
-
Method Details
-
swallow
Description copied from interface:ExceptionTranslatorThis swallows any exceptions. It should only be used with specific circumstances, like closing an open resource where you dont care if there's an error.
Note that you pretty much always care if there's an error.
- Specified by:
swallowin interfaceExceptionTranslator- Parameters:
tryBlock-
-
translate
- Specified by:
translatein interfaceExceptionTranslator
-
returns
- Specified by:
returnsin interfaceExceptionTranslator
-
newConfiguration
- Specified by:
newConfigurationin interfaceExceptionTranslator
-
getTargetException
-