SOLR-5905: Changed IllegalStateException to a SolrException

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1581236 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-03-25 05:09:11 +00:00
parent b9814a4a89
commit 4afe792b33
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ import org.apache.lucene.search.Scorer;
import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.FixedBitSet; import org.apache.lucene.util.FixedBitSet;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.NamedList;
@ -212,7 +213,7 @@ public class CollapsingQParserPlugin extends QParserPlugin {
public CollapsingPostFilter(SolrParams localParams, SolrParams params, SolrQueryRequest request) throws IOException { public CollapsingPostFilter(SolrParams localParams, SolrParams params, SolrQueryRequest request) throws IOException {
this.field = localParams.get("field"); this.field = localParams.get("field");
if (this.field == null) { if (this.field == null) {
throw new IllegalStateException("Required 'field' param is missing."); throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Required 'field' param is missing.");
} }
this.max = localParams.get("max"); this.max = localParams.get("max");
this.min = localParams.get("min"); this.min = localParams.get("min");