You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bm...@apache.org on 2004/11/16 22:56:59 UTC

cvs commit: jakarta-lucene/src/java/org/apache/lucene/index SegmentReader.java

bmesser     2004/11/16 13:56:59

  Modified:    src/java/org/apache/lucene/index SegmentReader.java
  Log:
  change from RuntimeException (Exception e) to RuntimeException (String s) to be backward compatible with jdk 1.3
  
  Revision  Changes    Path
  1.33      +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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- SegmentReader.java	6 Oct 2004 10:40:23 -0000	1.32
  +++ SegmentReader.java	16 Nov 2004 21:56:58 -0000	1.33
  @@ -100,7 +100,7 @@
                              SegmentReader.class.getName());
         IMPL = Class.forName(name);
       } catch (ClassNotFoundException e) {
  -      throw new RuntimeException(e);
  +      throw new RuntimeException("cannot load SegmentReader class: " + e.getMessage());
       }
     }
   
  @@ -123,7 +123,7 @@
       try {
         instance = (SegmentReader)IMPL.newInstance();
       } catch (Exception e) {
  -      throw new RuntimeException(e);
  +      throw new RuntimeException("cannot load SegmentReader class: " + e.getMessage());
       }
       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


Re: cvs commit: jakarta-lucene/src/java/org/apache/lucene/index SegmentReader.java

Posted by Bernhard Messer <bm...@apache.org>.
>On Tuesday 16 November 2004 22:56, bmesser@apache.org wrote:
>
>  
>
>>  +      throw new RuntimeException("cannot load SegmentReader class: "
>>+ e.getMessage());
>>    
>>
>
>I think it's better to leave out the call to getMessage(), as the 
>toString() which is then used automatically is slightly more verbose, it 
>contains the real name of the exception ("ClassNotFoundException" in this 
>case).
>  
>
changed and committed.

regards
Bernhard


Re: cvs commit: jakarta-lucene/src/java/org/apache/lucene/index SegmentReader.java

Posted by Daniel Naber <da...@t-online.de>.
On Tuesday 16 November 2004 22:56, bmesser@apache.org wrote:

>   +      throw new RuntimeException("cannot load SegmentReader class: "
> + e.getMessage());

I think it's better to leave out the call to getMessage(), as the 
toString() which is then used automatically is slightly more verbose, it 
contains the real name of the exception ("ClassNotFoundException" in this 
case).

Regards
 Daniel

-- 
http://www.danielnaber.de

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