diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2018-06-12 12:50:28 +0200 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2018-06-12 13:51:45 +0200 |
commit | 016e584f0ad5a071e13d75eb8ad5ddb46b8c54f5 (patch) | |
tree | 869d4e4a4c4b8a9f9ef691b2980009017dece9e6 /searchsummary/src | |
parent | 22796dddd3dc025018093783328ac87535ffecd9 (diff) |
use LOG_ABORT not just abort()
* abort() has the unfortunate effect that nothing is seen in the log,
just an event (which is usually not displayed); so ops people don't
see that the program is crashing at all.
* LOG_ABORT("message") will log an error with the message (and the file
and line) before calling abort(), so it's easy to see what happened.
* add or move <vespa/log/log.h> include and LOG_SETUP lines before
LOG_ABORT is used (or included).
Diffstat (limited to 'searchsummary/src')
-rw-r--r-- | searchsummary/src/tests/docsummary/positionsdfw_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/searchsummary/src/tests/docsummary/positionsdfw_test.cpp b/searchsummary/src/tests/docsummary/positionsdfw_test.cpp index 7e1da35bd75..ce184fd328a 100644 --- a/searchsummary/src/tests/docsummary/positionsdfw_test.cpp +++ b/searchsummary/src/tests/docsummary/positionsdfw_test.cpp @@ -63,9 +63,9 @@ public: return &_attr; } virtual const IAttributeVector * - getAttributeStableEnum(const string &) const override { abort(); } + getAttributeStableEnum(const string &) const override { LOG_ABORT("should not be reached"); } virtual void getAttributeList(vector<const IAttributeVector *> &) const override - { abort(); } + { LOG_ABORT("should not be reached"); } }; class MyAttributeManager : public IAttributeManager { @@ -74,13 +74,13 @@ public: MyAttributeManager(const IAttributeVector &attr) : _attr(attr) {} virtual AttributeGuard::UP getAttribute(const string &) const override { - abort(); + LOG_ABORT("should not be reached"); } virtual std::unique_ptr<attribute::AttributeReadGuard> getAttributeReadGuard(const string &, bool) const override { - abort(); + LOG_ABORT("should not be reached"); } virtual void getAttributeList(vector<AttributeGuard> &) const override { - abort(); + LOG_ABORT("should not be reached"); } virtual IAttributeContext::UP createContext() const override { return IAttributeContext::UP(new MyAttributeContext(_attr)); |