cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6309] Unwrapping Fault if possible
Date Fri, 20 Mar 2015 22:33:08 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes ab332bbb4 -> 6be44c2be


[CXF-6309] Unwrapping Fault if possible


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6be44c2b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6be44c2b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6be44c2b

Branch: refs/heads/2.7.x-fixes
Commit: 6be44c2be060d6c8b7c31f9d7a773cfcd23ef0f0
Parents: ab332bb
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Mar 20 22:27:42 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Mar 20 22:32:49 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6be44c2b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
index 1cb6d53..84cc4e7 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
@@ -753,7 +753,8 @@ public abstract class AbstractClient implements Client, Retryable {
                                                    cls,
                                                    JAXRSUtils.mediaTypeToString(ct));
         LOG.severe(errorMsg.toString());
-        throw new ClientException(errorMsg.toString(), cause);
+        Throwable actualEx = ex instanceof Fault ? ((Fault)ex).getCause() : ex;
+        throw new ClientException(errorMsg.toString(), actualEx);
     }
     
     private static MediaType getResponseContentType(Response r) {


Mime
View raw message