From 18ae4a35cb18e575541cc27098d2fc93939865e2 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Tue, 29 Jul 2008 16:59:43 +0000 Subject: [PATCH] improve logging for remote failure git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@680769 13f79535-47bb-0310-9956-ffa450edef68 --- .../proxy/DefaultRepositoryProxyConnectors.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java index f27b94aa7..c3a9743b5 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -822,9 +822,15 @@ public class DefaultRepositoryProxyConnectors } catch ( WagonException e ) { - throw new ProxyException( - "Download failure on resource [" + remoteRepository.getURL() + "/" + remotePath + "]:" + e.getMessage(), - e ); + // TODO: shouldn't have to drill into the cause, but TransferFailedException is often not descriptive enough + + String msg = + "Download failure on resource [" + remoteRepository.getURL() + "/" + remotePath + "]:" + e.getMessage(); + if ( e.getCause() != null ) + { + msg += " (cause: " + e.getCause() + ")"; + } + throw new ProxyException( msg, e ); } finally { -- 2.39.5