slightly more verbose output for TooManyClauses exception

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@425524 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2006-07-25 21:03:17 +00:00
parent 53888844c0
commit a0288da46d
1 changed files with 6 additions and 1 deletions

View File

@ -41,7 +41,12 @@ public class BooleanQuery extends Query {
* a PrefixQuery, FuzzyQuery, WildcardQuery, or RangeQuery
* is expanded to many terms during search.
*/
public static class TooManyClauses extends RuntimeException {}
public static class TooManyClauses extends RuntimeException {
public TooManyClauses() {}
public String getMessage() {
return "maxClauseCount is set to " + maxClauseCount;
}
}
/** Return the maximum number of clauses permitted, 1024 by default.
* Attempts to add more than the permitted number of clauses cause {@link