aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/yexception_ut.cpp
diff options
context:
space:
mode:
authorchegoryu <chegoryu@yandex-team.ru>2022-04-26 14:24:38 +0300
committerchegoryu <chegoryu@yandex-team.ru>2022-04-26 14:24:38 +0300
commit4513350c69deee250d0b12f40562bdf48868b171 (patch)
tree534b8e3fd269656d6131b7fd07c5bc1e51870209 /util/generic/yexception_ut.cpp
parentd5542c891803641fb11f2edf0d71e6004a5e9c38 (diff)
downloadydb-4513350c69deee250d0b12f40562bdf48868b171.tar.gz
IGNIETFERRO-1997 replace Y_VERIFY(exceptionPtr) with 'return "NO EXCEPTION"' in FormatCurrentException
ref:02c5a1e631a36a1f21b5b7678ecf4e245769dd9e
Diffstat (limited to 'util/generic/yexception_ut.cpp')
-rw-r--r--util/generic/yexception_ut.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp
index ae71a1ce221..80754d313e1 100644
--- a/util/generic/yexception_ut.cpp
+++ b/util/generic/yexception_ut.cpp
@@ -51,6 +51,9 @@ class TExceptionTest: public TTestBase {
UNIT_TEST(TestEnsureWithBackTrace2)
#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
UNIT_TEST(TestFormatCurrentException)
+#endif
+ UNIT_TEST(TestFormatCurrentExceptionWithNoException)
+#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
UNIT_TEST(TestFormatCurrentExceptionWithInvalidBacktraceFormatter)
#endif
UNIT_TEST(TestRethrowAppend)
@@ -148,6 +151,10 @@ private:
}
#endif
+ void TestFormatCurrentExceptionWithNoException() {
+ UNIT_ASSERT_VALUES_EQUAL(FormatCurrentException(), "(NO EXCEPTION)\n");
+ }
+
#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
void TestFormatCurrentExceptionWithInvalidBacktraceFormatter() {
auto invalidFormatter = [](IOutputStream*, void* const*, size_t) {