| 11 | #include <exception> |
| 12 | |
| 13 | void util::TraceThread(const char* thread_name, std::function<void()> thread_func) |
| 14 | { |
| 15 | util::ThreadRename(thread_name); |
| 16 | try { |
| 17 | LogPrintf("%s thread start\n", thread_name); |
| 18 | thread_func(); |
| 19 | LogPrintf("%s thread exit\n", thread_name); |
| 20 | } catch (const std::exception& e) { |
| 21 | PrintExceptionContinue(&e, thread_name); |
| 22 | throw; |
| 23 | } catch (...) { |
| 24 | PrintExceptionContinue(nullptr, thread_name); |
| 25 | throw; |
| 26 | } |
| 27 | } |
nothing calls this directly
no test coverage detected