Interface RuleBuilderExceptionHandler


public interface RuleBuilderExceptionHandler

An exception handler that is invoked for unchecked exceptions thrown by RuleSet.addRule(RuleBuilder)

The RuleSet's default exception handler simply re-throws the exception, thus breaking the whole build process:

     handler = (context, builder, exception) -> {
         throw exception;
     };

Custom RuleBuilderExceptionHandler implementations allow developers to optionally omit failed rules, continue with a different RuleBuilder, or throw unchecked exception if the original (cause) exception is deemed unrecoverable.

See Also: