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

Fix/mingw #3

Merged
merged 2 commits into from May 25, 2014
Merged

Fix/mingw #3

merged 2 commits into from May 25, 2014

Conversation

awulkiew
Copy link
Member

No description provided.

On Windows the exception object is created using the result of GetLastError().
When compiled using MinGW the throw instruction itself is using some WinApi call which overwrites the last error.
Therefore the error code must be retrieved before the exception is thrown.
@igaztanaga
Copy link
Member

Thanks for the report. Information on strange interactions between GetLastError and exceptions:

http://stackoverflow.com/questions/8671483/why-does-getlasterror-return-0-or-2-depending-on-how-it-is-called

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants