summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-07-26 15:24:39 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-07-31 17:04:18 +0200
commitc53f75542efbbe5e737744fe1104f7b8c56eb3b8 (patch)
treedf98d7f1206b60623594a43e23794d05485f1203 /searchlib
parent5f54fb77ef1e354f9919e92da7b22cbe68ee7fbd (diff)
Unify error handling to using exceptions only, not in combination with nullptr.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/expression/documentfieldnode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/expression/documentfieldnode.cpp b/searchlib/src/vespa/searchlib/expression/documentfieldnode.cpp
index a2679643784..d7209f4dd6d 100644
--- a/searchlib/src/vespa/searchlib/expression/documentfieldnode.cpp
+++ b/searchlib/src/vespa/searchlib/expression/documentfieldnode.cpp
@@ -139,11 +139,11 @@ void DocumentFieldNode::onPrepare(bool preserveAccurateTypes)
void DocumentFieldNode::onDocType(const DocumentType & docType)
{
LOG(debug, "DocumentFieldNode::onDocType(this=%p)", this);
- FieldPath::UP path = docType.buildFieldPath(_fieldName);
- if (!path.get() || path->empty()) {
+ _fieldPath.clear();
+ docType.buildFieldPath(_fieldPath, _fieldName);
+ if (_fieldPath.empty()) {
throw std::runtime_error(make_string("Field %s could not be loacated in documenttype %s", _fieldName.c_str(), docType.getName().c_str()));
}
- _fieldPath = *path;
}
class FieldValue2ResultNode : public ResultNode