lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmes...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index SegmentReader.java
Date Thu, 18 Nov 2004 18:37:53 GMT
bmesser     2004/11/18 10:37:53

  Modified:    src/java/org/apache/lucene/store FSDirectory.java
               src/java/org/apache/lucene/index SegmentReader.java
  Log:
  make the error messages more verbose using the exceptions toString() method.
  
  Revision  Changes    Path
  1.38      +4 -4      jakarta-lucene/src/java/org/apache/lucene/store/FSDirectory.java
  
  Index: FSDirectory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/store/FSDirectory.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- FSDirectory.java	16 Nov 2004 21:57:47 -0000	1.37
  +++ FSDirectory.java	18 Nov 2004 18:37:53 -0000	1.38
  @@ -65,7 +65,7 @@
                              FSDirectory.class.getName());
         IMPL = Class.forName(name);
       } catch (ClassNotFoundException e) {
  -      throw new RuntimeException("cannot load FSDirectory class: " + e.getMessage());
  +      throw new RuntimeException("cannot load FSDirectory class: " + e.toString());
       }
     }
   
  @@ -115,7 +115,7 @@
           try {
             dir = (FSDirectory)IMPL.newInstance();
           } catch (Exception e) {
  -          throw new RuntimeException("cannot load FSDirectory class: " + e.getMessage());
  +          throw new RuntimeException("cannot load FSDirectory class: " + e.toString());
           }
           dir.init(file, create);
           DIRECTORIES.put(file, dir);
  @@ -262,14 +262,14 @@
             try {
               in.close();
             } catch (IOException e) {
  -            throw new RuntimeException("Cannot close input stream: " + e.getMessage());
  +            throw new RuntimeException("Cannot close input stream: " + e.toString());
             }
           }
           if (out != null) {
             try {
               out.close();
             } catch (IOException e) {
  -            throw new RuntimeException("Cannot close output stream: " + e.getMessage());
  +            throw new RuntimeException("Cannot close output stream: " + e.toString());
             }
           }
         }
  
  
  
  1.34      +3 -3      jakarta-lucene/src/java/org/apache/lucene/index/SegmentReader.java
  
  Index: SegmentReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentReader.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- SegmentReader.java	16 Nov 2004 21:56:58 -0000	1.33
  +++ SegmentReader.java	18 Nov 2004 18:37:53 -0000	1.34
  @@ -100,7 +100,7 @@
                              SegmentReader.class.getName());
         IMPL = Class.forName(name);
       } catch (ClassNotFoundException e) {
  -      throw new RuntimeException("cannot load SegmentReader class: " + e.getMessage());
  +      throw new RuntimeException("cannot load SegmentReader class: " + e.toString());
       }
     }
   
  @@ -123,7 +123,7 @@
       try {
         instance = (SegmentReader)IMPL.newInstance();
       } catch (Exception e) {
  -      throw new RuntimeException("cannot load SegmentReader class: " + e.getMessage());
  +      throw new RuntimeException("cannot load SegmentReader class: " + e.toString());
       }
       instance.init(dir, sis, closeDir, ownDir);
       instance.initialize(si);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message