aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic
diff options
context:
space:
mode:
authorsvkrasnov <svkrasnov@yandex-team.ru>2022-03-26 13:19:59 +0300
committersvkrasnov <svkrasnov@yandex-team.ru>2022-03-26 13:19:59 +0300
commita6c36037482b150ce53f0ac36ba1dc07f8987900 (patch)
tree0132aaef4d83cd684a829604e87db34f3cb7f16c /util/generic
parent78caba673687bcd49fbf2ce6d097d318282ff002 (diff)
downloadydb-a6c36037482b150ce53f0ac36ba1dc07f8987900.tar.gz
Fix newline formatting in FormatCurrentException()
ref:1aefdabc38ec01ea10f53aa279edaa0dee29380d
Diffstat (limited to 'util/generic')
-rw-r--r--util/generic/yexception.cpp4
-rw-r--r--util/generic/yexception_ut.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/util/generic/yexception.cpp b/util/generic/yexception.cpp
index ee6d6ebe17..cccf44ad50 100644
--- a/util/generic/yexception.cpp
+++ b/util/generic/yexception.cpp
@@ -72,13 +72,13 @@ void FormatCurrentExceptionTo(IOutputStream& out) {
} catch (const std::exception& e) {
out << "Caught:\n";
FormatExceptionTo(out, e);
+ out << "\n";
#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
- out << "\n\n";
FormatBackTraceTo(out, backtrace);
#endif
return;
} catch (...) {
- out << "unknown error";
+ out << "unknown error\n";
return;
}
}
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp
index 89869fcbe8..ae71a1ce22 100644
--- a/util/generic/yexception_ut.cpp
+++ b/util/generic/yexception_ut.cpp
@@ -160,7 +160,7 @@ private:
UNIT_ASSERT(false);
} catch (...) {
TString expected = "Caught:\n"
- "(yexception) util/generic/yexception_ut.cpp:4: blabla\n\n"
+ "(yexception) util/generic/yexception_ut.cpp:4: blabla\n"
"Failed to print backtrace: "
"(yexception) util/generic/yexception_ut.cpp:8: 1 qw 12.1";
UNIT_ASSERT_EQUAL(FormatCurrentException(), expected);
@@ -170,7 +170,7 @@ private:
UNIT_ASSERT(false);
} catch (...) {
TString expected = "Caught:\n"
- "(std::logic_error) std exception\n\n"
+ "(std::logic_error) std exception\n"
"Failed to print backtrace: "
"(yexception) util/generic/yexception_ut.cpp:8: 1 qw 12.1";
UNIT_ASSERT_EQUAL(FormatCurrentException(), expected);