summaryrefslogtreecommitdiffstats
path: root/slobrok
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-06-12 12:50:28 +0200
committerArne Juul <arnej@yahoo-inc.com>2018-06-12 13:51:45 +0200
commit016e584f0ad5a071e13d75eb8ad5ddb46b8c54f5 (patch)
tree869d4e4a4c4b8a9f9ef691b2980009017dece9e6 /slobrok
parent22796dddd3dc025018093783328ac87535ffecd9 (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 'slobrok')
-rw-r--r--slobrok/src/vespa/slobrok/sbmirror.cpp6
-rw-r--r--slobrok/src/vespa/slobrok/server/cmd.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/slobrok/src/vespa/slobrok/sbmirror.cpp b/slobrok/src/vespa/slobrok/sbmirror.cpp
index 39f103173c5..d36e456995c 100644
--- a/slobrok/src/vespa/slobrok/sbmirror.cpp
+++ b/slobrok/src/vespa/slobrok/sbmirror.cpp
@@ -319,11 +319,11 @@ MirrorAPI::makeRequest()
if (_target == 0) return;
if (_reqPending) {
LOG(error, "cannot make new request, one is pending already");
- abort();
+ LOG_ABORT("should not be reached");
}
if (_scheduled) {
LOG(error, "cannot make new request, re-schedule is pending");
- abort();
+ LOG_ABORT("should not be reached");
}
_req = _orb.AllocRPCRequest(_req);
@@ -343,7 +343,7 @@ MirrorAPI::reSched(double seconds)
{
if (_scheduled) {
LOG(error, "already scheduled when asked to re-schedule in %f seconds", seconds);
- abort();
+ LOG_ABORT("should not be reached");
}
Schedule(seconds);
_scheduled = true;
diff --git a/slobrok/src/vespa/slobrok/server/cmd.cpp b/slobrok/src/vespa/slobrok/server/cmd.cpp
index bcb8c4ab711..6ba4f9a6e98 100644
--- a/slobrok/src/vespa/slobrok/server/cmd.cpp
+++ b/slobrok/src/vespa/slobrok/server/cmd.cpp
@@ -117,7 +117,7 @@ RegRpcSrvCommand::doneHandler(OkState result)
goto alldone;
}
// no other state should be possible
- abort();
+ LOG_ABORT("should not be reached");
alldone:
cleanupReservation();
delete _data;