aboutsummaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-08-20 22:27:03 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-08-20 22:27:12 +0000
commit6c6203e47bcca5309f0865c7e6c02855c6224a1c (patch)
treea4b85fd8e50ded46f91f2e9b83ddb503afff4f3b /document
parent683a3309292109ad03e49d09629384d6528bb7c3 (diff)
Move exception handling to where we can give proper feedback to the user.
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/fieldset/fieldsetrepo.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/document/src/vespa/document/fieldset/fieldsetrepo.cpp b/document/src/vespa/document/fieldset/fieldsetrepo.cpp
index 962e2efd6d0..bf9c9923572 100644
--- a/document/src/vespa/document/fieldset/fieldsetrepo.cpp
+++ b/document/src/vespa/document/fieldset/fieldsetrepo.cpp
@@ -132,8 +132,7 @@ FieldSetRepo::configureDocumentType(const DocumentType & documentType) {
auto fieldset = parse(_doumentTyperepo, fieldSetName);
_configuredFieldSets[fieldSetName] = std::move(fieldset);
} catch (const FieldNotFoundException & ex) {
- LOG(warning, "Did not find field %s in configured fieldset %s, will default to NO fields.",ex.getFieldName().c_str(), fieldSetName.c_str());
- _configuredFieldSets[fieldSetName] = std::make_shared<NoFields>();
+ // Just silently skip it so error handling can be done when you can return proper error to user.
}
}
}
@@ -143,12 +142,7 @@ FieldSetRepo::getFieldSet(vespalib::stringref fieldSetString) const {
if (found != _configuredFieldSets.end()) {
return found->second;
}
- try {
- return parse(_doumentTyperepo, fieldSetString);
- } catch (const FieldNotFoundException & ex) {
- LOG(warning, "Did not find field %s in configured fieldset %s, will default to NO fields.",ex.getFieldName().c_str(), vespalib::string(fieldSetString).c_str());
- return std::make_shared<NoFields>();
- }
+ return parse(_doumentTyperepo, fieldSetString);
}
}