You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/09/14 20:24:16 UTC

[maven-shared-io] 01/03: MSHARED-1142 – remove rendundant error message

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shared-io.git

commit 64a4e5c7d74732975e021763460d07a793a13ddd
Author: Koziolek <bj...@gmail.com>
AuthorDate: Wed Sep 14 16:50:23 2022 +0200

    MSHARED-1142 – remove rendundant error message
---
 .../maven/shared/io/download/DefaultDownloadManager.java  | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java b/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
index 5cf0087..bcfe40c 100644
--- a/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
+++ b/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
@@ -113,7 +113,7 @@ public class DefaultDownloadManager
         }
         catch ( UnsupportedProtocolException e )
         {
-            throw new DownloadFailedException( url, "Download failed. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed. ", e );
         }
 
         messageHolder.addMessage( "Using wagon: " + wagon + " to download: " + url );
@@ -128,8 +128,7 @@ public class DefaultDownloadManager
         }
         catch ( IOException e )
         {
-            throw new DownloadFailedException( url, "Failed to create temporary file target for download. Reason: "
-                + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Failed to create temporary file target for download. ", e );
         }
 
         messageHolder.addMessage( "Download target is: " + downloaded.getAbsolutePath() );
@@ -156,11 +155,11 @@ public class DefaultDownloadManager
         }
         catch ( ConnectionException e )
         {
-            throw new DownloadFailedException( url, "Download failed. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed. ", e );
         }
         catch ( AuthenticationException e )
         {
-            throw new DownloadFailedException( url, "Download failed. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed. ", e );
         }
 
         messageHolder.addMessage( "Getting: " + remotePath );
@@ -176,15 +175,15 @@ public class DefaultDownloadManager
         }
         catch ( TransferFailedException e )
         {
-            throw new DownloadFailedException( url, "Download failed. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed. ", e );
         }
         catch ( ResourceDoesNotExistException e )
         {
-            throw new DownloadFailedException( url, "Download failed. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed. ", e );
         }
         catch ( AuthorizationException e )
         {
-            throw new DownloadFailedException( url, "Download failed. Reason: " + e.getMessage(), e );
+            throw new DownloadFailedException( url, "Download failed. ", e );
         }
         finally
         {