svn commit: r642272 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel: CamelExchangeException.java ValidationException.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r642272 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel: CamelExchangeException.java ValidationException.java

jstrachan-2
Author: jstrachan
Date: Fri Mar 28 09:02:13 2008
New Revision: 642272

URL: http://svn.apache.org/viewvc?rev=642272&view=rev
Log:
added a few extra helper constructors

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelExchangeException.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ValidationException.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelExchangeException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelExchangeException.java?rev=642272&r1=642271&r2=642272&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelExchangeException.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelExchangeException.java Fri Mar 28 09:02:13 2008
@@ -26,7 +26,12 @@
     private final Exchange exchange;
 
     public CamelExchangeException(String message, Exchange exchange) {
-        super(message + " on the exchange: " +  exchange);
+        super(createMessage(message, exchange));
+        this.exchange = exchange;
+    }
+
+    public CamelExchangeException(String message, Exchange exchange, Throwable cause) {
+        super(createMessage(message, exchange), cause);
         this.exchange = exchange;
     }
 
@@ -39,4 +44,7 @@
         return exchange;
     }
 
+    protected static String createMessage(String message, Exchange exchange) {
+        return message + " on the exchange: " + exchange;
+    }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ValidationException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ValidationException.java?rev=642272&r1=642271&r2=642272&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ValidationException.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ValidationException.java Fri Mar 28 09:02:13 2008
@@ -30,4 +30,7 @@
         super(message, exchange);
     }
 
+    public ValidationException(String message, Exchange exchange, Throwable cause) {
+        super(message, exchange, cause);
+    }
 }