You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/04/05 12:42:30 UTC

svn commit: r645067 - /activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java

Author: davsclaus
Date: Sat Apr  5 03:42:28 2008
New Revision: 645067

URL: http://svn.apache.org/viewvc?rev=645067&view=rev
Log:
CAMEL-440: Documentation for CAMEL-410

Modified:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java?rev=645067&r1=645066&r2=645067&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java Sat Apr  5 03:42:28 2008
@@ -38,18 +38,18 @@
     public static class MyPolicyException extends Exception {
     }
 
+    // START SNIPPET customExceptionPolicyStrategyMyPolicy
     public static class MyPolicy implements ExceptionPolicyStrategy {
 
         public ExceptionType getExceptionPolicy(Map<Class, ExceptionType> exceptionPolicices,
                                                 Exchange exchange,
                                                 Throwable exception) {
-            // We forced a CamelException in the test below but our custom policy will
-            // override and let MyPolicyException handle it instead
+            // This is just an example that always forces the exception type configured
+            // with MyPolicyException to win.
             return exceptionPolicices.get(MyPolicyException.class);
         }
     }
-
-
+    // END SNIPPET customExceptionPolicyStrategyMyPolicy
 
     public void testCustomPolicy() throws Exception {
         MockEndpoint mock = getMockEndpoint(errorQueue);