Misleading error message if a DLL could not be loaded
ataulien opened this issue · 2 comments
I've noticed a rather misleading error message if a bsf-DLL fails to load because it cannot find some other DLL. For example, bsfPhysX.dll
fails to load if PhysX3_x64.dll
cannot be found.
This is the error message the program exits with:
[ERROR] A fatal error occurred and the program has to terminate!
- Error: InternalErrorException
- Description: Could not load dynamic library bsfPhysX.dll. System Error: Das angegebene Modul wurde nicht gefunden.
- In function: void __cdecl bs::DynLib::load(void)
- In file: ..\lib\bsf\Source\Foundation\bsfUtility\Utility\BsDynLib.cpp:41
The german text in there translates to The specified module was not found
.
So, basically, it says: "Cannot load bsfPhysX.dll, because the specified module was not found", which is wrong, because it DOES find
bsfPhysX.dll, it's just the call to load the
PhysX3_x64.dll` which produces that error message.
I suggest changing the message to something along these lines:
Failed to load Dynamic Library {dllname}.
It was found but produced an error during initialization: {error}
Library loading is handled by Windows, and that message is straight from Windows as well. We have little control or information about why it exactly failed or what error message we get.
Closing as wont fix.