You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Tom Cassimon (Jira)" <ji...@apache.org> on 2021/12/09 07:19:00 UTC
[jira] [Created] (CAMEL-17307) Possibility to define the exception thrown when predicate is used in validate camel dsl node
Tom Cassimon created CAMEL-17307:
------------------------------------
Summary: Possibility to define the exception thrown when predicate is used in validate camel dsl node
Key: CAMEL-17307
URL: https://issues.apache.org/jira/browse/CAMEL-17307
Project: Camel
Issue Type: Improvement
Components: came-core
Reporter: Tom Cassimon
It would be nice to allow the PredicateValidatingProcessor to throw a custom predefined exeption (defined in the Predicate maybe) and check if the Predicate has the custom exception and then throw that exception instead of a generic PredicateValidationException, to allow custom behaviour higher up in the stack depending on which validation has gone wrong.
Maybe add a default method to the Predicate interface to get the configured exception that defaults to the current exception. I can make a pull request if you like.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)