asar
asar copied to clipboard
DLL Binding Needs Better Error Checking
The current error checking in the C DLL binding is really bad (as in: non-existent). It only checks whether the DLL was loaded or not, but if it wasn't loaded, it doesn't give any info on why it failed. Basically, at least an HRESULT_FROM_WIN32(GetLastError()) should be there somewhere, maybe coupled with a simple API function to retrieve an error string in the case of failure.
Added a printf() and a debug print in fc023f4c048fbb2699dffe1e87223434e4be3467. However, I still think this needs more work. People who use Asar in a GUI application will likely not see any error traces. The interface itself should be updated to support returning an error string.
Doesn't that kinda stuff fit better in stderr than stdout?
Whoops, you're right, I didn't even think about that difference. That being said, I think the Linux implementation currently also just uses puts() for this, so we should change it there as well. Well, of course only if we don't implement a different form of error reporting altogether.