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/db/update/arithmetic_node_test.cpp | |
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/db/update/arithmetic_node_test.cpp')
-rw-r--r-- | src/mongo/db/update/arithmetic_node_test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/update/arithmetic_node_test.cpp b/src/mongo/db/update/arithmetic_node_test.cpp index 3a4d74121ea..a0a74654ac0 100644 --- a/src/mongo/db/update/arithmetic_node_test.cpp +++ b/src/mongo/db/update/arithmetic_node_test.cpp @@ -258,7 +258,7 @@ TEST_F(ArithmeticNodeTest, ApplyNonViablePathToInc) { setPathTaken("a"); addIndexedPath("a"); ASSERT_THROWS_CODE_AND_WHAT(node.apply(getApplyParams(doc.root()["a"])), - UserException, + AssertionException, ErrorCodes::PathNotViable, "Cannot create field 'b' in element {a: 5}"); } @@ -552,7 +552,7 @@ TEST_F(ArithmeticNodeTest, ApplyIncToObjectFails) { setPathTaken("a"); addIndexedPath("a"); ASSERT_THROWS_CODE_AND_WHAT(node.apply(getApplyParams(doc.root()["a"])), - UserException, + AssertionException, ErrorCodes::TypeMismatch, "Cannot apply $inc to a value of non-numeric type. {_id: " "\"test_object\"} has the field 'a' of non-numeric type object"); @@ -568,7 +568,7 @@ TEST_F(ArithmeticNodeTest, ApplyIncToArrayFails) { setPathTaken("a"); addIndexedPath("a"); ASSERT_THROWS_CODE_AND_WHAT(node.apply(getApplyParams(doc.root()["a"])), - UserException, + AssertionException, ErrorCodes::TypeMismatch, "Cannot apply $inc to a value of non-numeric type. {_id: " "\"test_object\"} has the field 'a' of non-numeric type array"); @@ -584,7 +584,7 @@ TEST_F(ArithmeticNodeTest, ApplyIncToStringFails) { setPathTaken("a"); addIndexedPath("a"); ASSERT_THROWS_CODE_AND_WHAT(node.apply(getApplyParams(doc.root()["a"])), - UserException, + AssertionException, ErrorCodes::TypeMismatch, "Cannot apply $inc to a value of non-numeric type. {_id: " "\"test_object\"} has the field 'a' of non-numeric type string"); @@ -663,7 +663,7 @@ TEST_F(ArithmeticNodeTest, ApplyPathNotViableArray) { setPathToCreate("b"); setPathTaken("a"); ASSERT_THROWS_CODE_AND_WHAT(node.apply(getApplyParams(doc.root()["a"])), - UserException, + AssertionException, ErrorCodes::PathNotViable, "Cannot create field 'b' in element {a: [ { b: 1 } ]}"); } @@ -775,7 +775,7 @@ TEST_F(ArithmeticNodeTest, ApplyNonViablePathThroughArray) { setPathToCreate("2.b"); setPathTaken("a"); ASSERT_THROWS_CODE_AND_WHAT(node.apply(getApplyParams(doc.root()["a"])), - UserException, + AssertionException, ErrorCodes::PathNotViable, "Cannot create field '2' in element {a: 0}"); } |