Skip to content

Conversation

awulkiew
Copy link
Member

No description provided.

awulkiew added 2 commits May 25, 2014 17:13
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.

2 participants