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 /document/src | |
parent | 93c5cb44ba9f8fa36314b8a4d6d57b75422f8c29 (diff) |
Adjust wrong tensor type exception message.
Diffstat (limited to 'document/src')
-rw-r--r-- | document/src/tests/tensor_fieldvalue/tensor_fieldvalue_test.cpp | 6 | ||||
-rw-r--r-- | document/src/vespa/document/fieldvalue/tensorfieldvalue.cpp | 2 |
2 files changed, 4 insertions, 4 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()); } |