diff options
Diffstat (limited to 'sandbox/scottkurz')
-rw-r--r-- | sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java b/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java index 89ce15e796..83ee0a12f3 100644 --- a/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java +++ b/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java @@ -96,12 +96,14 @@ public class DataTransformationInterceptor implements Interceptor, DataExchangeS Object transformedFault = null; if ((result instanceof Exception) && !(result instanceof RuntimeException)) { transformedFault = faultTransformHelper.transformFault(result, sourceOperation, targetOperation, wire); + if (transformedFault != result) { + resultMsg.setFaultBody(transformedFault); + } } - // Otherwise, we leave it to another layer to actually throw the RuntimeException which constitutes + // + // Leave it to another layer to actually throw the Exception which constitutes // the message body. We don't throw it here. - if (transformedFault != result) { - resultMsg.setFaultBody(transformedFault); - } + // } else { assert !(result instanceof Throwable) : "Expected messages that are not throwable " + result; Object newResult = transform(result, targetType, sourceType, true); |