summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-10-31 10:22:12 +0000
committerJon Bratseth <bratseth@oath.com>2018-10-31 10:22:12 +0000
commit114009196bb3669f3892fbd0ddeffe8ee6e2a633 (patch)
tree94d49411481a5202bc593a01b32d489fd92673b0 /container-search
parenta6aaec650c025f5ccb2c05dabaea82edd86484d5 (diff)
Improve error message
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/query/EquivItem.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/query/EquivItem.java b/container-search/src/main/java/com/yahoo/prelude/query/EquivItem.java
index 8667e31c4a6..13ae2078a53 100644
--- a/container-search/src/main/java/com/yahoo/prelude/query/EquivItem.java
+++ b/container-search/src/main/java/com/yahoo/prelude/query/EquivItem.java
@@ -12,7 +12,7 @@ import java.util.Collection;
* <p>
* This can only have Word, Int or Phrase children.
*
- * @author <a href="mailto:havardpe@yahoo-inc.com">havardpe</a>
+ * @author havardpe
*/
public class EquivItem extends CompositeTaggableItem {
@@ -27,7 +27,8 @@ public class EquivItem extends CompositeTaggableItem {
@Override
protected void adding(Item item) {
super.adding(item);
- Validator.ensure("Equiv can only have word/int/phrase as children",
+ Validator.ensure("Could not add an item of type " + item.getItemType() +
+ ": Equiv can only have word/int/phrase as children",
item.getItemType() == ItemType.WORD ||
item.getItemType() == ItemType.INT ||
item.getItemType() == ItemType.PHRASE);