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.- Since:
- 3.15
-
Method Summary
Modifier and TypeMethodDescription@Nullable ExceptionnewPredicateException(Exchange exchange, Predicate predicate, @Nullable String nodeId) Allows to return a specific exception for the given predicate in case it failed
-
Method Details
-
newPredicateException
@Nullable Exception newPredicateException(Exchange exchange, Predicate predicate, @Nullable 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.
-