summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2019-02-26 12:11:27 +0000
committerGeir Storli <geirst@verizonmedia.com>2019-02-26 12:11:27 +0000
commite56fe867e5d4bc2b50219c2c5c10e4ea04fac024 (patch)
tree3c3ef540e90ea950367390fad0c1718190516610 /document
parentb57bbc0bf415d969a603f9ef8ce112666b0c2b19 (diff)
Minor style changes.
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/update/tensor_add_update.cpp15
-rw-r--r--document/src/vespa/document/update/tensor_modify_update.cpp15
-rw-r--r--document/src/vespa/document/update/tensor_remove_update.cpp11
3 files changed, 17 insertions, 24 deletions
diff --git a/document/src/vespa/document/update/tensor_add_update.cpp b/document/src/vespa/document/update/tensor_add_update.cpp
index 96dc4d5e215..b8e36922d8c 100644
--- a/document/src/vespa/document/update/tensor_add_update.cpp
+++ b/document/src/vespa/document/update/tensor_add_update.cpp
@@ -73,9 +73,8 @@ void
TensorAddUpdate::checkCompatibility(const Field& field) const
{
if (field.getDataType().getClass().id() != TensorDataType::classId) {
- throw IllegalArgumentException(make_string(
- "Can not perform tensor add update on non-tensor field '%s'.",
- field.getName().data()), VESPA_STRLOC);
+ throw IllegalArgumentException(make_string("Cannot perform tensor add update on non-tensor field '%s'",
+ field.getName().data()), VESPA_STRLOC);
}
}
@@ -100,9 +99,8 @@ TensorAddUpdate::applyTo(FieldValue& value) const
tensorFieldValue = std::move(newTensor);
}
} else {
- std::string err = make_string(
- "Unable to perform a tensor add update on a \"%s\" field "
- "value.", value.getClass().name());
+ std::string err = make_string("Unable to perform a tensor add update on a '%s' field value",
+ value.getClass().name());
throw IllegalStateException(err, VESPA_STRLOC);
}
return true;
@@ -131,9 +129,8 @@ TensorAddUpdate::deserialize(const DocumentTypeRepo &repo, const DataType &type,
if (tensor->inherits(TensorFieldValue::classId)) {
_tensor.reset(static_cast<TensorFieldValue *>(tensor.release()));
} else {
- std::string err = make_string(
- "Expected tensor field value, got a \"%s\" field "
- "value.", tensor->getClass().name());
+ std::string err = make_string("Expected tensor field value, got a '%s' field value",
+ tensor->getClass().name());
throw IllegalStateException(err, VESPA_STRLOC);
}
VespaDocumentDeserializer deserializer(repo, stream, Document::getNewestSerializationVersion());
diff --git a/document/src/vespa/document/update/tensor_modify_update.cpp b/document/src/vespa/document/update/tensor_modify_update.cpp
index a7f82cad3c7..64fc57d5287 100644
--- a/document/src/vespa/document/update/tensor_modify_update.cpp
+++ b/document/src/vespa/document/update/tensor_modify_update.cpp
@@ -151,9 +151,8 @@ void
TensorModifyUpdate::checkCompatibility(const Field& field) const
{
if (field.getDataType().getClass().id() != TensorDataType::classId) {
- throw IllegalArgumentException(make_string(
- "Can not perform tensor modify update on non-tensor field '%s'.",
- field.getName().data()), VESPA_STRLOC);
+ throw IllegalArgumentException(make_string("Cannot perform tensor modify update on non-tensor field '%s'",
+ field.getName().data()), VESPA_STRLOC);
}
}
@@ -179,9 +178,8 @@ TensorModifyUpdate::applyTo(FieldValue& value) const
tensorFieldValue = std::move(newTensor);
}
} else {
- std::string err = make_string(
- "Unable to perform a tensor modify update on a \"%s\" field "
- "value.", value.getClass().name());
+ std::string err = make_string("Unable to perform a tensor modify update on a '%s' field value",
+ value.getClass().name());
throw IllegalStateException(err, VESPA_STRLOC);
}
return true;
@@ -219,9 +217,8 @@ TensorModifyUpdate::deserialize(const DocumentTypeRepo &repo, const DataType &ty
if (tensor->inherits(TensorFieldValue::classId)) {
_tensor.reset(static_cast<TensorFieldValue *>(tensor.release()));
} else {
- std::string err = make_string(
- "Expected tensor field value, got a \"%s\" field "
- "value.", tensor->getClass().name());
+ std::string err = make_string("Expected tensor field value, got a '%s' field value",
+ tensor->getClass().name());
throw IllegalStateException(err, VESPA_STRLOC);
}
VespaDocumentDeserializer deserializer(repo, stream, Document::getNewestSerializationVersion());
diff --git a/document/src/vespa/document/update/tensor_remove_update.cpp b/document/src/vespa/document/update/tensor_remove_update.cpp
index 671bf260629..7ae0604f3ca 100644
--- a/document/src/vespa/document/update/tensor_remove_update.cpp
+++ b/document/src/vespa/document/update/tensor_remove_update.cpp
@@ -70,9 +70,8 @@ void
TensorRemoveUpdate::checkCompatibility(const Field &field) const
{
if (field.getDataType().getClass().id() != TensorDataType::classId) {
- throw IllegalArgumentException(make_string(
- "Can not perform tensor remove update on non-tensor field '%s'.",
- field.getName().data()), VESPA_STRLOC);
+ throw IllegalArgumentException(make_string("Cannot perform tensor remove update on non-tensor field '%s'",
+ field.getName().data()), VESPA_STRLOC);
}
}
@@ -103,7 +102,7 @@ TensorRemoveUpdate::applyTo(FieldValue &value) const
tensorFieldValue = std::move(newTensor);
}
} else {
- std::string err = make_string("Unable to perform a tensor remove update on a '%s' field value.",
+ std::string err = make_string("Unable to perform a tensor remove update on a '%s' field value",
value.getClass().name());
throw IllegalStateException(err, VESPA_STRLOC);
}
@@ -133,8 +132,8 @@ TensorRemoveUpdate::deserialize(const DocumentTypeRepo &repo, const DataType &ty
if (tensor->inherits(TensorFieldValue::classId)) {
_tensor.reset(static_cast<TensorFieldValue *>(tensor.release()));
} else {
- std::string err = make_string(
- "Expected tensor field value, got a \"%s\" field value.", tensor->getClass().name());
+ std::string err = make_string("Expected tensor field value, got a '%s' field value",
+ tensor->getClass().name());
throw IllegalStateException(err, VESPA_STRLOC);
}
VespaDocumentDeserializer deserializer(repo, stream, Document::getNewestSerializationVersion());