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

Method TestFormatCurrentException

util/generic/yexception_ut.cpp:141–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 // TODO(svkrasnov): the output should be canonized after https://st.yandex-team.ru/YMAKE-103
140#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
141 void TestFormatCurrentException() {
142 try {
143 throw std::logic_error("some exception"); // is instance of std::exception
144 UNIT_ASSERT(false);
145 } catch (...) {
146 TString exceptionMessage = FormatCurrentException();
147 UNIT_ASSERT(exceptionMessage.Contains("(std::logic_error) some exception"));
148 TVector<TString> backtraceStrs = StringSplitter(exceptionMessage).Split('\n');
149 UNIT_ASSERT(backtraceStrs.size() > 1);
150 }
151 }
152#endif
153
154 void TestFormatCurrentExceptionWithNoException() {

Callers

nothing calls this directly

Calls 5

FormatCurrentExceptionFunction · 0.85
StringSplitterFunction · 0.85
ContainsMethod · 0.45
SplitMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected