| 33 | ::NUnitTest::TRaiseErrorHandler RaiseErrorHandler; |
| 34 | |
| 35 | void ::NUnitTest::NPrivate::RaiseError(const char* what, const TString& msg, bool fatalFailure) { |
| 36 | Y_ABORT_UNLESS(UnittestThread, "%s in non-unittest thread with message:\n%s", what, msg.data()); |
| 37 | Y_ABORT_UNLESS(GetCurrentTest()); |
| 38 | |
| 39 | if (RaiseErrorHandler) { |
| 40 | RaiseErrorHandler(what, msg, fatalFailure); |
| 41 | return; |
| 42 | } |
| 43 | |
| 44 | // Default handler |
| 45 | TBackTrace bt; |
| 46 | bt.Capture(); |
| 47 | GetCurrentTest()->AddError(msg.data(), bt.PrintToString()); |
| 48 | if (!fatalFailure) { |
| 49 | return; |
| 50 | } |
| 51 | throw TAssertException(); |
| 52 | } |
| 53 | |
| 54 | void ::NUnitTest::SetRaiseErrorHandler(::NUnitTest::TRaiseErrorHandler handler) { |
| 55 | Y_ABORT_UNLESS(UnittestThread); |
nothing calls this directly
no test coverage detected