hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r565434 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
Date Mon, 13 Aug 2007 17:24:28 GMT
Author: omalley
Date: Mon Aug 13 10:24:28 2007
New Revision: 565434

URL: http://svn.apache.org/viewvc?view=rev&rev=565434
Log:
HADOOP-1568 followup to fix java 1.5 incompatibility

Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java?view=diff&rev=565434&r1=565433&r2=565434
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java Mon Aug 13 10:24:28
2007
@@ -95,7 +95,9 @@
       connection.setRequestMethod("GET");
       connection.connect();
     } catch (URISyntaxException e) {
-      throw new IOException(e);
+      IOException ie = new IOException("invalid url");
+      ie.initCause(e);
+      throw ie;
     }
     final InputStream in = connection.getInputStream();
     return new FSDataInputStream(new FSInputStream() {
@@ -162,8 +164,14 @@
 
         InputStream resp = connection.getInputStream();
         xr.parse(new InputSource(resp));
-      } catch (Exception e) {
-        throw new IOException(e);
+      } catch (SAXException e) { 
+        IOException ie = new IOException("invalid xml directory content");
+        ie.initCause(e);
+        throw ie;
+      } catch (URISyntaxException e) {
+        IOException ie = new IOException("invalid url");
+        ie.initCause(e);
+        throw ie;
       }
     }
 



Mime
View raw message