Class ET


  • public final class ET
    extends java.lang.Object
    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