summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2022-02-07 12:15:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-07 12:42:02 +0000
commited2e8137e7911fde3815c45f733776211fb7cc94 (patch)
tree1ccaab786ce42439762f2c113587f02f003e951e
parent111c63d91c067b00199635c42243d43784e7145b (diff)
downloadmongo-ed2e8137e7911fde3815c45f733776211fb7cc94.tar.gz
SERVER-63309 Change geoNear user accessible tassert to uassert
-rw-r--r--src/mongo/db/pipeline/document_source_geo_near.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_geo_near.cpp b/src/mongo/db/pipeline/document_source_geo_near.cpp
index 707bd096628..1ee840df794 100644
--- a/src/mongo/db/pipeline/document_source_geo_near.cpp
+++ b/src/mongo/db/pipeline/document_source_geo_near.cpp
@@ -155,7 +155,10 @@ Pipeline::SourceContainer::iterator DocumentSourceGeoNear::splitForTimeseries(
// asNearQuery() is something like '{fieldName: {$near: ...}}'.
// GeoNearExpression seems to want something like '{$near: ...}'.
auto nearQuery = asNearQuery(keyFieldPath->fullPath()).firstElement().Obj().getOwned();
- tassert(nearExpr.parseFrom(nearQuery));
+ auto exprStatus = nearExpr.parseFrom(nearQuery);
+ uassert(6330900,
+ str::stream() << "Unable to parse geoNear query: " << exprStatus.reason(),
+ exprStatus.isOK());
tassert(5860204,
"Unexpected GeoNearExpression field name after asNearQuery(): "_sd + nearExpr.field,
nearExpr.field == ""_sd);