| 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 |
nothing calls this directly
no test coverage detected