diff options
author | Ted Tuckman <ted.tuckman@mongodb.com> | 2022-02-07 12:15:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-07 12:42:02 +0000 |
commit | ed2e8137e7911fde3815c45f733776211fb7cc94 (patch) | |
tree | 1ccaab786ce42439762f2c113587f02f003e951e /src/mongo/db/pipeline | |
parent | 111c63d91c067b00199635c42243d43784e7145b (diff) | |
download | mongo-ed2e8137e7911fde3815c45f733776211fb7cc94.tar.gz |
SERVER-63309 Change geoNear user accessible tassert to uassert
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r-- | src/mongo/db/pipeline/document_source_geo_near.cpp | 5 |
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); |