| 18 | #endif // WIN32 |
| 19 | |
| 20 | static std::string FormatException(const std::exception* pex, std::string_view thread_name) |
| 21 | { |
| 22 | #ifdef WIN32 |
| 23 | char pszModule[MAX_PATH] = ""; |
| 24 | GetModuleFileNameA(nullptr, pszModule, sizeof(pszModule)); |
| 25 | #else |
| 26 | const char* pszModule = "bitcoin"; |
| 27 | #endif |
| 28 | if (pex) |
| 29 | return strprintf( |
| 30 | "EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, thread_name); |
| 31 | else |
| 32 | return strprintf( |
| 33 | "UNKNOWN EXCEPTION \n%s in %s \n", pszModule, thread_name); |
| 34 | } |
| 35 | |
| 36 | void PrintExceptionContinue(const std::exception* pex, std::string_view thread_name) |
| 37 | { |
no test coverage detected