| 62 | |
| 63 | namespace NPrivate { |
| 64 | [[noreturn]] Y_NO_INLINE void InternalPanicImpl(int line, const char* function, const char* expr, int, int, int, const TStringBuf file, const char* errorMessage, size_t errorMessageSize) noexcept try { |
| 65 | TStringBuf errorMsg{errorMessage, errorMessageSize}; |
| 66 | const TString now = TInstant::Now().ToStringLocal(); |
| 67 | |
| 68 | TString r; |
| 69 | TStringOutput o(r); |
| 70 | if (expr) { |
| 71 | o << "VERIFY failed (" << now << "): " << errorMsg << Endl; |
| 72 | } else { |
| 73 | o << "FAIL (" << now << "): " << errorMsg << Endl; |
| 74 | } |
| 75 | o << " " << file << ":" << line << Endl; |
| 76 | if (expr) { |
| 77 | o << " " << function << "(): requirement " << expr << " failed" << Endl; |
| 78 | } else { |
| 79 | o << " " << function << "() failed" << Endl; |
| 80 | } |
| 81 | |
| 82 | TString backTrace; |
| 83 | #ifndef WITH_VALGRIND |
| 84 | try { |
| 85 | TStringOutput backTraceOutput(backTrace); |
| 86 | FormatBackTrace(&backTraceOutput); |
| 87 | } catch (...) { |
| 88 | backTrace = "Failed to print backtrace due: " + CurrentExceptionMessage() + "\n"; |
| 89 | } |
| 90 | #endif |
| 91 | o << backTrace; |
| 92 | Cerr << r << Flush; |
| 93 | #ifdef CLANG_COVERAGE |
| 94 | if (__llvm_profile_write_file()) { |
| 95 | Cerr << "Failed to dump clang coverage" << Endl; |
| 96 | } |
| 97 | #endif |
| 98 | abort(); |
| 99 | } catch (...) { |
| 100 | abort(); |
| 101 | } |
| 102 | } // namespace NPrivate |
no test coverage detected