Java RouteBuilder configuring context scoped error handler should not be a 
fluent builder
-----------------------------------------------------------------------------------------

                 Key: CAMEL-5032
                 URL: https://issues.apache.org/jira/browse/CAMEL-5032
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
            Priority: Minor
             Fix For: 2.10.0


People may configure code like
{code}
@Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                errorHandler(defaultErrorHandler())
                    .onException(Exception.class)
                    .redeliveryPolicyRef("redeliveryPolicy")
                    .log(LoggingLevel.ERROR, "Error");
{code}

Which is wrong. As the context scoped error handler, should be a void method, 
so people have to configure the onException in a new method as best practice 
would be.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to