aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilnurkh <ilnurkh@yandex-team.com>2023-10-13 10:48:46 +0300
committerilnurkh <ilnurkh@yandex-team.com>2023-10-13 11:08:49 +0300
commitd7b34fc15831ce7a378f63249f34017467024cff (patch)
treedbf77774079aaf4d36efa6ef0018a8d4e3153fc2
parentcd717844bef17da243794b42b88328c1732d009c (diff)
downloadydb-d7b34fc15831ce7a378f63249f34017467024cff.tar.gz
do not check exceptions during expression evaluation
-rw-r--r--util/system/yassert.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/util/system/yassert.h b/util/system/yassert.h
index e27e76374c..d611069133 100644
--- a/util/system/yassert.h
+++ b/util/system/yassert.h
@@ -77,20 +77,13 @@ namespace NPrivate {
}
/// Assert that does not depend on NDEBUG macro and outputs message like printf
-#define Y_ABORT_UNLESS(expr, ...) \
- do { \
- try { \
- if (Y_UNLIKELY(!(expr))) { \
- Y_HIT_DEBUGGER(); \
- /* NOLINTNEXTLINE */ \
- ::NPrivate::Panic(__SOURCE_FILE_IMPL__, __LINE__, __FUNCTION__, #expr, " " __VA_ARGS__); \
- } \
- } catch (...) { \
- Y_HIT_DEBUGGER(); \
- /* NOLINTNEXTLINE */ \
- ::NPrivate::Panic(__SOURCE_FILE_IMPL__, __LINE__, __FUNCTION__, #expr, "Exception during assert" \
- " " __VA_ARGS__); \
- } \
+#define Y_ABORT_UNLESS(expr, ...) \
+ do { \
+ if (Y_UNLIKELY(!(expr))) { \
+ Y_HIT_DEBUGGER(); \
+ /* NOLINTNEXTLINE */ \
+ ::NPrivate::Panic(__SOURCE_FILE_IMPL__, __LINE__, __FUNCTION__, #expr, " " __VA_ARGS__); \
+ } \
} while (false)
#define Y_ABORT(...) Y_ABORT_UNLESS(false, __VA_ARGS__)