java.lang.Object
com.mscharhag.et.ET
Global factory that can be used to create new
ExceptionTranslator configurations using
ET.newConfiguration().
Usage:
ExceptionTranslator et = ET.newConfiguration()
// Exception translator configuration
.translate(FooException.class).to(MyRuntimeException.class)
.translate(BazException.class).using(OtherException::new)
.translate(BarException.class).using((message, exception) -> { .. })
.done(); // Create ExceptionTranslator from configuration
-
Method Summary
Modifier and TypeMethodDescriptionReturns a newExceptionTranslatorConfigurerthat can be used to create a newExceptionTranslatorconfiguration.
-
Method Details
-
newConfiguration
Returns a newExceptionTranslatorConfigurerthat can be used to create a newExceptionTranslatorconfiguration.- Returns:
- an
ExceptionTranslatorConfigurer, nevernull
-