diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2019-03-07 15:18:45 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2019-03-07 15:18:45 +0100 |
commit | dd41a5b13c767b6a1a685b9d4be873cebff6b5fa (patch) | |
tree | 542d444fd546cae6fe40caf4d67859c68605ca69 | |
parent | 93c5cb44ba9f8fa36314b8a4d6d57b75422f8c29 (diff) |
Adjust wrong tensor type exception message.
3 files changed, 5 insertions, 5 deletions
diff --git a/document/src/tests/tensor_fieldvalue/tensor_fieldvalue_test.cpp b/document/src/tests/tensor_fieldvalue/tensor_fieldvalue_test.cpp index 08e615bccaf..dc91df0b5a0 100644 --- a/document/src/tests/tensor_fieldvalue/tensor_fieldvalue_test.cpp +++ b/document/src/tests/tensor_fieldvalue/tensor_fieldvalue_test.cpp @@ -96,7 +96,7 @@ TEST("require that wrong tensor type for special case assign throws exception") TensorFieldValue tensorFieldValue(xSparseTensorDataType); EXPECT_EXCEPTION(tensorFieldValue = makeSimpleTensor(), document::WrongTensorTypeException, - "WrongTensorTypeException: Field tensor type is 'tensor(x{})' but tensor type is 'tensor(x{},y{})'"); + "WrongTensorTypeException: Field tensor type is 'tensor(x{})' but other tensor type is 'tensor(x{},y{})'"); } TEST("require that wrong tensor type for copy assign throws exception") @@ -106,7 +106,7 @@ TEST("require that wrong tensor type for copy assign throws exception") simpleTensorFieldValue = makeSimpleTensor(); EXPECT_EXCEPTION(tensorFieldValue = simpleTensorFieldValue, document::WrongTensorTypeException, - "WrongTensorTypeException: Field tensor type is 'tensor(x{})' but tensor type is 'tensor(x{},y{})'"); + "WrongTensorTypeException: Field tensor type is 'tensor(x{})' but other tensor type is 'tensor(x{},y{})'"); } TEST("require that wrong tensor type for assignDeserialized throws exception") @@ -114,7 +114,7 @@ TEST("require that wrong tensor type for assignDeserialized throws exception") TensorFieldValue tensorFieldValue(xSparseTensorDataType); EXPECT_EXCEPTION(tensorFieldValue.assignDeserialized(makeSimpleTensor()), document::WrongTensorTypeException, - "WrongTensorTypeException: Field tensor type is 'tensor(x{})' but tensor type is 'tensor(x{},y{})'"); + "WrongTensorTypeException: Field tensor type is 'tensor(x{})' but other tensor type is 'tensor(x{},y{})'"); } TEST_MAIN() { TEST_RUN_ALL(); } diff --git a/document/src/vespa/document/fieldvalue/tensorfieldvalue.cpp b/document/src/vespa/document/fieldvalue/tensorfieldvalue.cpp index 399720e2354..f209358c901 100644 --- a/document/src/vespa/document/fieldvalue/tensorfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/tensorfieldvalue.cpp @@ -24,7 +24,7 @@ TensorDataType emptyTensorDataType; vespalib::string makeWrongTensorTypeMsg(const ValueType &fieldTensorType, const ValueType &tensorType) { - return vespalib::make_string("Field tensor type is '%s' but tensor type is '%s'", + return vespalib::make_string("Field tensor type is '%s' but other tensor type is '%s'", fieldTensorType.to_spec().c_str(), tensorType.to_spec().c_str()); } diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp index b17f13eaea0..caee69b311e 100644 --- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp @@ -738,7 +738,7 @@ checkUpdate(FeedHandlerFixture &f, SchemaContext &schemaContext, TEST_DO(f.feedView.checkCounts(0, 0u, 0, 0u)); EXPECT_EQUAL(Result::TRANSIENT_ERROR, token.getResult()->getErrorCode()); if (fieldName == "tensor2") { - EXPECT_EQUAL("Update operation rejected for document 'id:test:searchdocument::foo' of type 'searchdocument': 'Wrong tensor type: Field tensor type is 'tensor(x{},y{})' but tensor type is 'tensor(x{})''", + EXPECT_EQUAL("Update operation rejected for document 'id:test:searchdocument::foo' of type 'searchdocument': 'Wrong tensor type: Field tensor type is 'tensor(x{},y{})' but other tensor type is 'tensor(x{})''", token.getResult()->getErrorMessage()); } else { EXPECT_EQUAL("Update operation rejected for document 'id:test:searchdocument::foo' of type 'searchdocument': 'Field not found'", |