MB-21540: ep_time.cc: Replace abort() with std::logic_error 74/69374/3
authorDave Rigby <daver@couchbase.com>
Tue, 1 Nov 2016 16:04:59 +0000 (16:04 +0000)
committerDave Rigby <daver@couchbase.com>
Fri, 4 Nov 2016 13:30:21 +0000 (13:30 +0000)
Change-Id: I26ab8f0f92e879ba6fe49e974d79fa020da20a69
Reviewed-on: http://review.couchbase.org/69374
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: buildbot <build@couchbase.com>
src/ep_time.cc

index 1400f78..79bbbfa 100644 (file)
  */
 
 #include "config.h"
+
 #include "ep_time.h"
-#include <stdlib.h>
+
+#include <stdexcept>
 
 static rel_time_t uninitialized_current_time(void) {
-    abort();
+    throw std::logic_error("unitialized_current_time called");
     return 0;
 }
 
 static time_t default_abs_time(rel_time_t notused) {
-    (void)notused;
-    abort();
+    throw std::logic_error("default_abs_time called");
     return 0;
 }
 
 static rel_time_t default_reltime(time_t notused) {
-    (void)notused;
-    abort();
+    throw std::logic_error("default_reltime called");
     return 0;
 }