geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r702555 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
Date Tue, 07 Oct 2008 17:40:36 GMT
Author: dblevins
Date: Tue Oct  7 10:40:35 2008
New Revision: 702555

URL: http://svn.apache.org/viewvc?rev=702555&view=rev
Log:
Print the repo URI when no connection can be made

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java?rev=702555&r1=702554&r2=702555&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
Tue Oct  7 10:40:35 2008
@@ -183,7 +183,13 @@
         URLConnection con = location.openConnection();
         if (con instanceof HttpURLConnection) {
             HttpURLConnection http = (HttpURLConnection) con;
-            http.connect();
+
+            try {
+                http.connect();
+            } catch (IOException e) {
+                throw (IOException) new IOException("Cannot connect to "+location).initCause(e);
+            }
+
             if (http.getResponseCode() == 401) { // need to authenticate
                 if (username == null || username.equals("")) {
                     throw new FailedLoginException("Server returned 401 " + http.getResponseMessage());



Mime
View raw message