Print field name when meet unexpected token.

closes #12391
This commit is contained in:
xuzha 2015-08-21 01:16:38 -07:00
parent 2276ff6283
commit 2af6f3fbff
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());
} }
} }