Skip to content

Commit a11e89f

Browse files
committed
impl
1 parent 5608914 commit a11e89f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

base/base/defines.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@
9696
# endif
9797
#endif
9898

99-
#if !defined(ABORT_ON_LOGICAL_ERROR) && defined(DEBUG_OR_SANITIZER_BUILD)
100-
# define ABORT_ON_LOGICAL_ERROR
101-
#endif
102-
10399
/// chassert(x) is similar to assert(x), but:
104100
/// - works in builds with sanitizers, not only in debug builds
105101
/// - tries to print failed assertion into server log
@@ -108,7 +104,7 @@
108104
/// Also it makes sense to call abort() instead of __builtin_unreachable() in debug builds,
109105
/// because SIGABRT is easier to debug than SIGTRAP (the second one makes gdb crazy)
110106
#if !defined(chassert)
111-
#if defined(ABORT_ON_LOGICAL_ERROR)
107+
# if defined(DEBUG_OR_SANITIZER_BUILD)
112108
// clang-format off
113109
#include <base/types.h>
114110
namespace DB

src/Common/Exception.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void handle_error_code(const std::string & msg, int code, bool remote, const Exc
6464
{
6565
// In debug builds and builds with sanitizers, treat LOGICAL_ERROR as an assertion failure.
6666
// Log the message before we fail.
67-
#ifdef ABORT_ON_LOGICAL_ERROR
67+
#ifdef DEBUG_OR_SANITIZER_BUILD
6868
if (code == ErrorCodes::LOGICAL_ERROR)
6969
{
7070
abortOnFailedAssertion(msg, trace.data(), 0, trace.size());
@@ -443,7 +443,7 @@ PreformattedMessage getCurrentExceptionMessageAndPattern(bool with_stacktrace, b
443443
}
444444
catch (...) {} // NOLINT(bugprone-empty-catch)
445445

446-
#ifdef ABORT_ON_LOGICAL_ERROR
446+
#ifdef DEBUG_OR_SANITIZER_BUILD
447447
try
448448
{
449449
throw;

0 commit comments

Comments
 (0)