You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/01/23 10:31:00 UTC

[jira] [Resolved] (CAMEL-17307) Possibility to define the exception thrown when predicate is used in validate camel dsl node

     [ https://issues.apache.org/jira/browse/CAMEL-17307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-17307.
---------------------------------
    Resolution: Fixed

You can now implement a custom PredicateExceptionFactory and register it to the registry to use it as global, or per validate you can refer to a custom factory to use.

> 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
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.15.0
>
>
> 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)