MCPcopy Create free account
hub / github.com/catboost/catboost / TestEnsureWithBackTrace2

Method TestEnsureWithBackTrace2

util/generic/yexception_ut.cpp:124–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 inline void TestEnsureWithBackTrace2() {
125 try {
126 Y_ENSURE_BT(4 > 6, "custom "
127 << "message");
128 } catch (...) {
129 const TString msg = CurrentExceptionMessage();
130 UNIT_ASSERT(!msg.Contains("4 > 6"));
131 UNIT_ASSERT(msg.Contains("custom message"));
132 UNIT_ASSERT(msg.Contains("\n"));
133 EnsureCurrentExceptionHasBackTrace<yexception>();
134 return;
135 }
136 UNIT_ASSERT(false);
137 }
138
139 // TODO(svkrasnov): the output should be canonized after https://st.yandex-team.ru/YMAKE-103
140#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE

Callers

nothing calls this directly

Calls 2

CurrentExceptionMessageFunction · 0.85
ContainsMethod · 0.45

Tested by

no test coverage detected