camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Error handling in Camel
Date Tue, 04 Jun 2013 11:00:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/Error+handling+in+Camel?focusedCommentId=31823807#comment-31823807">Error
handling in Camel</a></h2>
        <h4>Page
        <b>comment added</b> by              <a href="https://cwiki.apache.org/confluence/display/~edwardost">Edward
Ost</a>
    </h4>
    <br/>
    <div class="notificationGreySide">
       <p>Error handlers and the onException clause in Camel only handle Exceptions.
 Faults thrown by endpoints are not handled by default.  In order to enable errorHandlers
and onExceptions clauses to manage exceptions the handleFault property must be set.  It can
be set on context, RouteBuilder, or route scope.  To set it on the context scope with JavaDSL
call</p>

<p>getContext().setHandleFault(true)</p>

<p>To set it with Spring DSL set the handleFault attribute of the context</p>

<p>&lt;camelContext handleFault="true"&gt;<br/>
...</p>

<p>To set it with route scope,</p>

<p>from("vm:myendpoint").setHandleFault(true)</p>

<p>To set it with Spring DSL set the handleFault attribute of the context</p>

<p>&lt;route handleFault="true"&gt;<br/>
...</p>
    </div>

        
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Error+handling+in+Camel?focusedCommentId=31823807#comment-31823807">View
Online</a>
              |
       <a id="reply-31823807" href="https://cwiki.apache.org/confluence/display/CAMEL/Error+handling+in+Camel?replyToComment=31823807#comment-31823807">Reply
To This</a>
           </div>

</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message