| 47 | } |
| 48 | |
| 49 | Y_DECLARE_UNUSED static void FormatBackTraceTo(IOutputStream& out, const TBackTrace& backtrace) { |
| 50 | if (backtrace.size() == 0) { |
| 51 | out << "backtrace is empty"; |
| 52 | return; |
| 53 | } |
| 54 | try { |
| 55 | backtrace.PrintTo(out); |
| 56 | } catch (const std::exception& e) { |
| 57 | out << "Failed to print backtrace: "; |
| 58 | FormatExceptionTo(out, e); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | void FormatCurrentExceptionTo(IOutputStream& out) { |
| 63 | auto exceptionPtr = std::current_exception(); |
no test coverage detected