Author: rfeng
Date: Tue Apr 1 09:12:08 2008
New Revision: 643467
URL: http://svn.apache.org/viewvc?rev=643467&view=rev
Log:
Change the exception message for non-business faults
Modified:
incubator/tuscany/java/sca/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
Modified:
incubator/tuscany/java/sca/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java?rev=643467&r1=643466&r2=643467&view=diff
==============================================================================
---
incubator/tuscany/java/sca/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
(original)
+++
incubator/tuscany/java/sca/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
Tue Apr 1 09:12:08 2008
@@ -33,10 +33,10 @@
import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
import org.apache.tuscany.sca.interfacedef.util.FaultException;
import org.apache.tuscany.sca.interfacedef.util.XMLType;
+import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
import org.apache.tuscany.sca.invocation.Interceptor;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
import org.apache.tuscany.sca.runtime.RuntimeWire;
import org.osoa.sca.ServiceRuntimeException;
@@ -131,9 +131,9 @@
DataType targetFaultType = getFaultType(targetDataType);
if (targetFaultType == null) {
- throw new ServiceRuntimeException("Target fault type
cannot be resolved: " + targetDataType,
- (Throwable)result);
- // throw new TransformationException("Target fault type
cannot be resolved: " + targetDataType);
+ // No matching fault type, it's a system exception
+ Throwable cause = (Throwable) result;
+ throw new ServiceRuntimeException(cause);
}
// FIXME: How to match a source fault type to a target fault
@@ -151,9 +151,9 @@
}
if (sourceFaultType == null) {
- throw new ServiceRuntimeException("No matching source
fault type is found: " + targetFaultType,
- (Throwable)result);
- // throw new TransformationException("No matching source
fault type is found: " + targetFaultType);
+ // No matching fault type, it's a system exception
+ Throwable cause = (Throwable) result;
+ throw new ServiceRuntimeException(cause);
}
Object newResult =
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]