cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r991325 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
Date Tue, 31 Aug 2010 20:56:07 GMT
Author: sergeyb
Date: Tue Aug 31 20:56:06 2010
New Revision: 991325

URL: http://svn.apache.org/viewvc?rev=991325&view=rev
Log:
Merged revisions 991324 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r991324 | sergeyb | 2010-08-31 21:54:13 +0100 (Tue, 31 Aug 2010) | 1 line
  
  [CXF-2961] Applying a patch on behalf of Peter Easton, thanks
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 31 20:56:06 2010
@@ -1 +1 @@
-/cxf/trunk:989123,989434,990386,990593
+/cxf/trunk:989123,989434,990386,990593,991324

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=991325&r1=991324&r2=991325&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
Tue Aug 31 20:56:06 2010
@@ -598,6 +598,7 @@ public class WebClient extends AbstractC
 
     protected Response doChainedInvocation(String httpMethod, 
         MultivaluedMap<String, String> headers, Object body, Class<?> responseClass,
Type genericType) {
+        Throwable primaryError = null;
         
         URI uri = getCurrentURI();
         Message m = createMessage(httpMethod, headers, uri);
@@ -613,12 +614,18 @@ public class WebClient extends AbstractC
         
         try {
             m.getInterceptorChain().doIntercept(m);
+            primaryError = m.getExchange().get(Exception.class);
         } catch (Throwable ex) {
-            // we'd like a user to get the whole Response anyway if needed
+            primaryError = ex;
         }
+
         
         // TODO : this needs to be done in an inbound chain instead
         HttpURLConnection connect = (HttpURLConnection)m.get(HTTPConduit.KEY_HTTP_CONNECTION);
+        if (connect == null && primaryError != null) {
+            /** do we have a pre-connect error ? */
+            throw new WebApplicationException(primaryError);
+        }
         return handleResponse(connect, m, responseClass, genericType);
     }
     



Mime
View raw message