summaryrefslogtreecommitdiff
path: root/src/mongo/bson/json.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-10-16 18:59:08 -0400
committerMathias Stearn <mathias@10gen.com>2017-11-02 14:25:21 -0400
commita0ebc55db521792632fb3ece87edafec327cc2a9 (patch)
treeb2098c89f241082a9c1a55ed69794eef210aa312 /src/mongo/bson/json.cpp
parent9f8696b5ba4c9310749c5c3f1ee082c5f663b5b0 (diff)
downloadmongo-a0ebc55db521792632fb3ece87edafec327cc2a9.tar.gz
SERVER-31622 Fix bad throws
Diffstat (limited to 'src/mongo/bson/json.cpp')
-rw-r--r--src/mongo/bson/json.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/bson/json.cpp b/src/mongo/bson/json.cpp
index 5e132e1e5b3..f5909e6c3ff 100644
--- a/src/mongo/bson/json.cpp
+++ b/src/mongo/bson/json.cpp
@@ -1302,13 +1302,13 @@ BSONObj fromjson(const char* jsonString, int* len) {
} catch (std::exception& e) {
std::ostringstream message;
message << "caught exception from within JSON parser: " << e.what();
- throw AssertionException(17031, message.str());
+ uasserted(17031, message.str());
}
if (ret != Status::OK()) {
ostringstream message;
message << "code " << ret.code() << ": " << ret.codeString() << ": " << ret.reason();
- throw AssertionException(16619, message.str());
+ uasserted(16619, message.str());
}
if (len)
*len = jparse.offset();