summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-01-12 12:55:59 +0000
committerArne Juul <arnej@yahooinc.com>2023-01-12 12:55:59 +0000
commit950e943ae8ab9feb47c4c69640b052366835be44 (patch)
tree8ae17d17ba4a6fa59d1b3cb054f76b3377a76598 /document
parenta642ea5db84e936912bd175fe9599873c1ccf041 (diff)
add noreturn, fix indent
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/serialization/annotationdeserializer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/document/src/vespa/document/serialization/annotationdeserializer.cpp b/document/src/vespa/document/serialization/annotationdeserializer.cpp
index e3e3f81143f..41bc9ec8aaa 100644
--- a/document/src/vespa/document/serialization/annotationdeserializer.cpp
+++ b/document/src/vespa/document/serialization/annotationdeserializer.cpp
@@ -19,7 +19,7 @@ using std::unique_ptr;
namespace document {
namespace {
-void fail(const char *message) {
+[[noreturn]] void fail(const char *message) {
throw DeserializeException(message);
}
}
@@ -128,7 +128,7 @@ void AnnotationDeserializer::readAnnotation(Annotation & annotation) {
uint32_t span_node_id = getInt1_2_4Bytes(_stream);
if (span_node_id > _nodes.size()) {
LOG(warning, "Annotation of type %u has node_id %u > #nodes %zd", type_id, span_node_id, _nodes.size());
- fail("Annotation refers to out-of-bounds span node");
+ fail("Annotation refers to out-of-bounds span node");
} else {
span_node = _nodes[span_node_id];
}
@@ -140,7 +140,7 @@ void AnnotationDeserializer::readAnnotation(Annotation & annotation) {
if (!data_type) {
LOG(warning, "Bad data type %d for annotation type %s",
data_type_id, type->getName().c_str());
- fail("Annotation with bad datatype for its value");
+ fail("Annotation with bad datatype for its value");
} else {
FieldValue::UP value(data_type->createFieldValue());
VespaDocumentDeserializer deserializer(_repo, _stream, _version);