Camel
  1. Camel
  2. CAMEL-5032

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      People may configure code like

      @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");
      

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development