Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorOnWhenTest.java}
Tip
titleUse end() to end the block

Notice when using Java DSL we must use end() to indicate where the try .. catch .. finally block ends. As the example above has a finally, then the end() should be at the end of the finally block. If we are not using a finally, then the end() should be at the end of the doCatch to indicate the end there.

Using try .. catch .. finally in Spring DSL

...