Bug 22947 – sysErrorString throws Exception instead of WindowsException
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2022-03-27T18:39:09Z
Last change time
2022-03-31T08:24:57Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2022-03-27T18:39:09Z
This contradicts the documentation of WindowsException which is intended for errors based of GetLastError.
Comment #1 by dlang-bot — 2022-03-27T22:23:24Z
@MoonlightSentinel created dlang/phobos pull request #8422 "Fix 22947 - Use wenforce in sysErrorString" fixing this issue:
- Fix 22947 - Use wenforce in sysErrorString
This ensures that the method throws a `WindowsException` initialised
with the proper error code. Also avoids unrelated exceptions that
could suppress the error which caused the call to `sysErrorString`.
https://github.com/dlang/phobos/pull/8422
Comment #2 by dlang-bot — 2022-03-31T08:24:57Z
dlang/phobos pull request #8422 "Fix 22947 - Use wenforce in sysErrorString" was merged into master:
- 5c60f05dc94be988f69d3e7b025205cf657f80b1 by MoonlightSentinel:
Fix 22947 - Use wenforce in sysErrorString
This ensures that the method throws a `WindowsException` initialised
with the proper error code. Also avoids unrelated exceptions that
could suppress the error which caused the call to `sysErrorString`.
https://github.com/dlang/phobos/pull/8422