title: Apache Camel - Exception is not catched
body: <p>I read the corresponding documentation but I couldn't figure out why my Exception is not catched.</p>
  
  <p>This is my route configuration:</p>
  
  <pre><code>  &lt;route id="foo"&gt;
      &lt;from uri="vm://.../&gt;
      &lt;doTry&gt;
        &lt;to uri="jetty:http://127.0.0.1:123/foo?restletMethod=PUT"/&gt;
        &lt;to uri="ejb:java:global/..?method=method1(${body}, ${headers})"/&gt;
        &lt;to uri="ejb:java:global/..?method=method2(${body}, ${headers})"/&gt;
        &lt;doCatch&gt;
          &lt;exception&gt;java.lang.Exception&lt;/exception&gt;
          &lt;transform&gt;
             &lt;simple&gt; ${exception.message} &lt;/simple&gt; 
          &lt;/transform&gt;
          &lt;to uri="smtp://... /&gt;
        &lt;/doCatch&gt;
      &lt;/doTry&gt;
    &lt;/route&gt;
  </code></pre>
  
  <p>Now when the JettyClient is not reachable a <code>org.apache.camel.CamelExchangeException</code> is thrown,
  the route terminates and I receive an email. This is the desired behaviour.</p>
  
  <p>But when <code>method1</code> throws an exception it is not catched, hence the route continues and 
  I don't receive an email.</p>
  
  <p>How can I make camel recognize and handle the exception in the second case too?</p>
  
  <p><strong>Solution:</strong> Make sure the exception isn't thrown inside a try-catch block -.-</p>