Explorar o código

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 %!s(int64=19) %!d(string=hai) anos
pai
achega
db6e9f2850
Modificáronse 2 ficheiros con 5 adicións e 1 borrados
  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
 17. HADOOP-251.  Fix task processes to be tolerant of failed progress
     reports to their parent process.  (omalley via cutting)
     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
 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 {
     public FSInputStream openRaw(Path f) throws IOException {
         if (! exists(f)) {
         if (! exists(f)) {
-            throw new FileNotFoundException(toString());
+            throw new FileNotFoundException(f.toString());
         }
         }
         return new LocalFSFileInputStream(f);
         return new LocalFSFileInputStream(f);
     }
     }