Remove invalid use of Exception for something it was not intended to

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1212994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-12-11 11:25:06 +00:00
parent f4128bd21a
commit 1757f192ac
1 changed files with 2 additions and 3 deletions

View File

@ -23,7 +23,6 @@ import org.apache.lucene.index.Fields;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.index.FieldsEnum;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.FieldReaderException;
import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.store.FSDirectory;
@ -117,7 +116,7 @@ public class HighFreqTerms {
if (field != null) {
Fields fields = MultiFields.getFields(reader);
if (fields == null) {
throw new FieldReaderException("field " + field + " not found");
throw new RuntimeException("field " + field + " not found");
}
Terms terms = fields.terms(field);
if (terms != null) {
@ -128,7 +127,7 @@ public class HighFreqTerms {
} else {
Fields fields = MultiFields.getFields(reader);
if (fields == null) {
throw new FieldReaderException("no fields found for this index");
throw new RuntimeException("no fields found for this index");
}
tiq = new TermStatsQueue(numTerms);
FieldsEnum fieldsEnum = fields.iterator();