Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL Binding Needs Better Error Checking #165

Open
RPGHacker opened this issue Jul 5, 2020 · 3 comments
Open

DLL Binding Needs Better Error Checking #165

RPGHacker opened this issue Jul 5, 2020 · 3 comments
Labels
DLL Interface Issues specific to the DLL interface.

Comments

@RPGHacker
Copy link
Owner

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.

@RPGHacker RPGHacker added the DLL Interface Issues specific to the DLL interface. label Jul 5, 2020
@RPGHacker
Copy link
Owner Author

Added a printf() and a debug print in fc023f4. 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.

@Alcaro
Copy link
Contributor

Alcaro commented Jul 5, 2020

Doesn't that kinda stuff fit better in stderr than stdout?

@RPGHacker
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DLL Interface Issues specific to the DLL interface.
Projects
None yet
Development

No branches or pull requests

2 participants