diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2018-06-20 11:49:38 +0200 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2018-06-20 11:49:38 +0200 |
commit | 016612733da6f4e16428ec3f95dc5e19b932a0c5 (patch) | |
tree | 4f626b6113e79ad41c1289b5b6cb4c1f6f0f68f8 /document | |
parent | d161b6bcb87566a31cb5e0700b84f968539f502f (diff) |
some more cleanup
Diffstat (limited to 'document')
3 files changed, 7 insertions, 7 deletions
diff --git a/document/src/vespa/document/datatype/primitivedatatype.cpp b/document/src/vespa/document/datatype/primitivedatatype.cpp index aa8879e299e..3755ebc370e 100644 --- a/document/src/vespa/document/datatype/primitivedatatype.cpp +++ b/document/src/vespa/document/datatype/primitivedatatype.cpp @@ -67,10 +67,8 @@ PrimitiveDataType::createFieldValue() const case T_BYTE: return FieldValue::UP(new ByteFieldValue); case T_PREDICATE: return FieldValue::UP(new PredicateFieldValue); case T_TENSOR: return std::make_unique<TensorFieldValue>(); - LOG_ABORT("should not be reached"); } - assert(!"getId() returned value out of range"); - LOG_ABORT("should not be reached"); + LOG_ABORT("getId() returned value out of range"); } void diff --git a/document/src/vespa/document/repo/document_type_repo_factory.cpp b/document/src/vespa/document/repo/document_type_repo_factory.cpp index e60c4c976a9..becf4face92 100644 --- a/document/src/vespa/document/repo/document_type_repo_factory.cpp +++ b/document/src/vespa/document/repo/document_type_repo_factory.cpp @@ -24,8 +24,7 @@ public: EmptyFactoryCheck::~EmptyFactoryCheck() { if (!DocumentTypeRepoFactory::empty()) { - std::cerr << "DocumentTypeRepoFactory not empty at shutdown" << std::endl; - LOG_ABORT("should not be reached"); + LOG_ABORT("DocumentTypeRepoFactory not empty at shutdown"); } } diff --git a/document/src/vespa/document/select/operator.cpp b/document/src/vespa/document/select/operator.cpp index b1c1c77ab4e..b2e7ddd82b8 100644 --- a/document/src/vespa/document/select/operator.cpp +++ b/document/src/vespa/document/select/operator.cpp @@ -6,6 +6,9 @@ #include <vespa/vespalib/stllike/hash_map.hpp> #include <cassert> +#include <vespa/log/log.h> +LOG_SETUP(".document.select.operator"); + namespace document::select { Operator::OperatorMap Operator::_operators; @@ -15,7 +18,7 @@ Operator::Operator(const vespalib::stringref & name) { OperatorMap::iterator it = _operators.find(name); if (it != _operators.end()) { - assert(false); + LOG_ABORT("unknown operator, should not happen"); } _operators[_name] = this; } @@ -25,7 +28,7 @@ Operator::get(const vespalib::stringref & name) { OperatorMap::iterator it = _operators.find(name); if (it == _operators.end()) { - assert(false); + LOG_ABORT("unknown operator, should not happen"); } return *it->second; } |