Interface PredicateExceptionFactory


  • public interface PredicateExceptionFactory
    A factory that can be used to create a specific exception when a Predicate returning false, which can be used by camel-validator and other components.
    • Method Detail

      • newPredicateException

        Exception newPredicateException​(Exchange exchange,
                                        Predicate predicate,
                                        String nodeId)
        Allows to return a specific exception for the given predicate in case it failed
        Parameters:
        exchange - the current exchange
        predicate - the predicate that returned false
        nodeId - optional node id from validate EIP using this factory
        Returns:
        the exception, or null to not use a specific exception but let Camel use a standard exception such as PredicateValidationException.