print error on loading failure
This commit is contained in:
parent
115bfb228d
commit
614f14eb0a
@ -41,7 +41,17 @@ Plugin::Plugin(const char* path) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!_dl) {
|
if (!_dl) {
|
||||||
std::cerr << "PLG opening '" << path << "' failed\n";
|
std::cerr << "PLG opening '" << path << "' failed";
|
||||||
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
// TODO: windows error reporting
|
||||||
|
std::cerr << ": " << GetLastError() << ";
|
||||||
|
#else
|
||||||
|
const auto* error = dlerror();
|
||||||
|
if (error != nullptr) {
|
||||||
|
std::cerr << ": '" << error << "'";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
std::cerr << "\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user