Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 4284 invoked from network); 17 Nov 2009 01:27:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Nov 2009 01:27:54 -0000 Received: (qmail 45415 invoked by uid 500); 17 Nov 2009 01:27:54 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 45335 invoked by uid 500); 17 Nov 2009 01:27:54 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 45322 invoked by uid 99); 17 Nov 2009 01:27:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 01:27:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 01:27:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 286E22388901; Tue, 17 Nov 2009 01:27:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r881085 - in /cxf/branches/2.1.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java Date: Tue, 17 Nov 2009 01:27:30 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091117012730.286E22388901@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Tue Nov 17 01:27:28 2009 New Revision: 881085 URL: http://svn.apache.org/viewvc?rev=881085&view=rev Log: Merged revisions 881005 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes ................ r881005 | dkulp | 2009-11-16 17:14:14 -0500 (Mon, 16 Nov 2009) | 9 lines Merged revisions 880992 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r880992 | dkulp | 2009-11-16 17:04:07 -0500 (Mon, 16 Nov 2009) | 1 line [CXF-2537] Even better error message ........ ................ Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java cxf/branches/2.1.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=881085&r1=881084&r2=881085&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original) +++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Tue Nov 17 01:27:28 2009 @@ -1938,12 +1938,19 @@ try { handleResponse(); } catch (IOException e) { + String url = connection.getURL().toString(); + String origMessage = e.getMessage(); + if (origMessage != null && origMessage.contains(url)) { + throw e; + } throw mapException(e.getClass().getSimpleName() - + " invoking " + connection.getURL(), e, + + " invoking " + connection.getURL() + ": " + + e.getMessage(), e, IOException.class); } catch (RuntimeException e) { throw mapException(e.getClass().getSimpleName() - + " invoking " + connection.getURL(), e, + + " invoking " + connection.getURL() + ": " + + e.getMessage(), e, RuntimeException.class); } finally { if (cachingForRetransmission && cachedStream != null) { @@ -1951,7 +1958,8 @@ } } } - private T mapException(String msg, T ex, Class cls) { + private T mapException(String msg, + T ex, Class cls) { T ex2 = ex; try { ex2 = cls.cast(ex.getClass().getConstructor(String.class).newInstance(msg)); Modified: cxf/branches/2.1.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java?rev=881085&r1=881084&r2=881085&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java (original) +++ cxf/branches/2.1.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java Tue Nov 17 01:27:28 2009 @@ -153,7 +153,7 @@ greeter.greetMe("cxf"); fail("Didn't get the exception"); } catch (Exception ex) { - ex.printStackTrace(); + //ex.printStackTrace(); assertTrue(ex.getCause().getClass().getName(), ex.getCause() instanceof SocketTimeoutException); }