summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/arithmetic_node_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/update/arithmetic_node_test.cpp')
-rw-r--r--src/mongo/db/update/arithmetic_node_test.cpp12
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}");
}