diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-08-10 15:52:33 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-08-16 16:28:02 -0400 |
commit | 347935f7a5d0452146b1a73ad7ef9e249eaf1fb5 (patch) | |
tree | 00b322f5adcf3eb9c2624747a6b5b2179e440052 /src/mongo/bson | |
parent | cdf7aacb213c99d3ce620761ff46b030bbd7732d (diff) | |
download | mongo-347935f7a5d0452146b1a73ad7ef9e249eaf1fb5.tar.gz |
SERVER-30580 Eliminate UserException and MsgAssertionException types
All users were converted to just use AssertionException.
Diffstat (limited to 'src/mongo/bson')
-rw-r--r-- | src/mongo/bson/bsonelement.h | 2 | ||||
-rw-r--r-- | src/mongo/bson/json.cpp | 4 | ||||
-rw-r--r-- | src/mongo/bson/json.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index 6b605fffd71..7d58f4653aa 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -134,7 +134,7 @@ public: Note the returned object is a reference to within the parent bson object. If that object is out of scope, this pointer will no longer be valid. Call getOwned() on the returned BSONObj if you need your own copy. - throws UserException if the element is not of type object. + throws AssertionException if the element is not of type object. */ BSONObj Obj() const; diff --git a/src/mongo/bson/json.cpp b/src/mongo/bson/json.cpp index 647accf31ba..5e132e1e5b3 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 MsgAssertionException(17031, message.str()); + throw AssertionException(17031, message.str()); } if (ret != Status::OK()) { ostringstream message; message << "code " << ret.code() << ": " << ret.codeString() << ": " << ret.reason(); - throw MsgAssertionException(16619, message.str()); + throw AssertionException(16619, message.str()); } if (len) *len = jparse.offset(); diff --git a/src/mongo/bson/json.h b/src/mongo/bson/json.h index 81bf78ace36..abc27f6daf6 100644 --- a/src/mongo/bson/json.h +++ b/src/mongo/bson/json.h @@ -45,7 +45,7 @@ namespace mongo { * quotes. JSON unicode escape sequences (of the form \uXXXX) are * converted to utf8. * - * @throws MsgAssertionException if parsing fails. The message included with + * @throws AssertionException if parsing fails. The message included with * this assertion includes the character offset where parsing failed. */ BSONObj fromjson(const std::string& str); |