verbose libcurl error

This commit is contained in:
lightbulblighter 2022-06-07 01:11:03 -07:00
parent a08bcfa39e
commit b5b253e69f
No known key found for this signature in database
GPG Key ID: 0B2452F9DE0E2D01
1 changed files with 7 additions and 2 deletions

View File

@ -88,9 +88,14 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
ExitProcess(EXIT_FAILURE);
}
CURLcode result = curl_global_init(CURL_GLOBAL_DEFAULT);
if (result != CURLE_OK)
CURLcode error = curl_global_init(CURL_GLOBAL_DEFAULT);
if (error != CURLE_OK)
{
#ifdef _DEBUG
std::string message = "curl_global_init returned " + std::to_string(error);
MessageBoxA(nullptr, message.c_str(), nullptr, MB_ICONERROR);
#endif
ExitProcess(EXIT_FAILURE);
}
}