Sfoglia il codice sorgente

HADOOP-325. Improve the FileNotFound exceptions thrown by LocalFileSystem to include the name of the file. Contributed by Benjamin Reed.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@409451 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 anni fa
parent
commit
db6e9f2850
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 4 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/fs/LocalFileSystem.java

+ 4 - 0
CHANGES.txt

@@ -65,6 +65,10 @@ Trunk (unreleased)
 17. HADOOP-251.  Fix task processes to be tolerant of failed progress
     reports to their parent process.  (omalley via cutting)
 
+18. HADOOP-325.  Improve the FileNotFound exceptions thrown by
+    LocalFileSystem to include the name of the file.
+    (Benjamin Reed via cutting)
+
 
 Release 0.2.1 - 2006-05-12
 

+ 1 - 1
src/java/org/apache/hadoop/fs/LocalFileSystem.java

@@ -120,7 +120,7 @@ public class LocalFileSystem extends FileSystem {
     
     public FSInputStream openRaw(Path f) throws IOException {
         if (! exists(f)) {
-            throw new FileNotFoundException(toString());
+            throw new FileNotFoundException(f.toString());
         }
         return new LocalFSFileInputStream(f);
     }