Skip to content

Commit

Permalink
Reduce depth of exception cause to pass tests
Browse files Browse the repository at this point in the history
The changes to expose GeoShapeQueryable.toQuantizeLuceneGeometry to
external use also caused exception causes to be one level deeper.
This fix just brings the underlying message up one level to get
tests to pass.
While we could have also changed tests to assert on causes a level
deeper, this fix seems more backwards compatible, just in case anyone
else is relying on causes.
  • Loading branch information
craigtaverner committed May 9, 2022
1 parent 3354a59 commit 74dc54b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ default Query geoShapeQuery(SearchExecutionContext context, String fieldName, Sh
try {
luceneGeometries = toQuantizeLuceneGeometry(shape, relation);
} catch (IllegalArgumentException e) {
throw new QueryShardException(context, "Exception creating query on Field [" + fieldName + "]", e);
throw new QueryShardException(context, "Exception creating query on Field [" + fieldName + "] " + e.getMessage(), e);
}
if (luceneGeometries.length == 0) {
return new MatchNoDocsQuery();
Expand Down

0 comments on commit 74dc54b

Please sign in to comment.