Skip to content

Commit 9947386

Browse files
author
Hari Khalsa
committed
SERVER-7794 change throw to uasserted
1 parent 7c3744c commit 9947386

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mongo/db/geo/s2index.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ namespace mongo {
188188
if (nearQuery && intersectQuery) {
189189
// Sigh. This can be handled better. TODO.
190190
for (size_t j = 0; j < regions.size(); ++j) { regions[j].free(); }
191-
throw UserException(16474, "Can't do both near and intersect, query: "
192-
+ query.toString());
191+
uasserted(16474, "Can't do both near and intersect, query: "
192+
+ query.toString());
193193
}
194194

195195
BSONObjIterator argIt(e.embeddedObject());
@@ -227,7 +227,7 @@ namespace mongo {
227227
numWanted);
228228
return shared_ptr<Cursor>(cursor);
229229
} else {
230-
throw UserException(16475, "Asking for s2 cursor w/bad query: " + query.toString());
230+
uasserted(16475, "Asking for s2 cursor w/bad query: " + query.toString());
231231
}
232232
}
233233

0 commit comments

Comments
 (0)