lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject lucene-solr:branch_7x: improve exception message
Date Tue, 19 Sep 2017 18:23:46 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x ee2a2763a -> 1777b9bb6


improve exception message


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1777b9bb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1777b9bb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1777b9bb

Branch: refs/heads/branch_7x
Commit: 1777b9bb6bcd5d5968ee28521bb0369ad5056619
Parents: ee2a276
Author: Mike McCandless <mikemccand@apache.org>
Authored: Tue Sep 19 14:23:08 2017 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Tue Sep 19 14:23:27 2017 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/analysis/synonym/SynonymMap.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1777b9bb/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
----------------------------------------------------------------------
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
b/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
index 7371e23..97db1de 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
@@ -321,7 +321,8 @@ public class SynonymMap {
             throw new IllegalArgumentException("term: " + text + " analyzed to a zero-length
token");
           }
           if (posIncAtt.getPositionIncrement() != 1) {
-            throw new IllegalArgumentException("term: " + text + " analyzed to a token with
posinc != 1");
+            throw new IllegalArgumentException("term: " + text + " analyzed to a token ("
+ termAtt +
+                                               ") with position increment != 1 (got: " +
posIncAtt.getPositionIncrement() + ")");
           }
           reuse.grow(reuse.length() + length + 1); /* current + word + separator */
           int end = reuse.length();


Mime
View raw message