Skip to content

Commit

Permalink
MB-43818: Use throwWithTrace for Monotonic
Browse files Browse the repository at this point in the history
Change-Id: I3d79e3ff42ecfe2d449fc68382db3b893534bf28
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/145405
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
  • Loading branch information
daverigby committed Feb 8, 2021
1 parent e4d8fda commit 3275537
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions engines/ep/src/monotonic.h
Expand Up @@ -19,6 +19,7 @@

#include "comparators.h"

#include <platform/exceptions.h>
#include <atomic>
#include <limits>
#include <stdexcept>
Expand Down Expand Up @@ -47,11 +48,11 @@ struct ThrowExceptionPolicy {

void nonMonotonic(const T& curValue, const T& newValue) {
using std::to_string;
throw std::logic_error(
cb::throwWithTrace(std::logic_error(
std::string("Monotonic<") + typeid(T).name() + "> (" + label +
") invariant failed: new value (" + to_string(newValue) +
") breaks invariant on current value (" +
to_string(curValue) + ")");
") breaks invariant on current value (" + to_string(curValue) +
")"));
}

/**
Expand Down

0 comments on commit 3275537

Please sign in to comment.