Merge pull request #13033 from xuzha/xu-12391

Print field name when meet unexpected token.
This commit is contained in:
Colin Goodheart-Smithe 2015-08-26 14:41:08 +02:00
commit bd0753eaa3
1 changed files with 2 additions and 2 deletions

View File

@ -145,8 +145,8 @@ public class GeoDistanceParser implements Aggregator.Parser {
+ currentFieldName + "].", parser.getTokenLocation()); + currentFieldName + "].", parser.getTokenLocation());
} }
} else { } else {
throw new SearchParseException(context, "Unexpected token " + token + " in [" + aggregationName + "].", throw new SearchParseException(context, "Unexpected token " + token + " in [" + aggregationName + "]: ["
parser.getTokenLocation()); + currentFieldName + "].", parser.getTokenLocation());
} }
} }