Package org.apache.camel.spi
Interface PredicateExceptionFactory
-
public interface PredicateExceptionFactory
A factory that can be used to create a specific exception when aPredicate
returning false, which can be used by camel-validator and other components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Exception
newPredicateException(Exchange exchange, Predicate predicate, String nodeId)
Allows to return a specific exception for the given predicate in case it failed
-
-
-
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 exchangepredicate
- the predicate that returned falsenodeId
- 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.
-
-