Bug 22946 – WindowsException ctor is not nothrow

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2022-03-27T17:32:09Z
Last change time
2022-03-27T22:15:14Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
See also
https://issues.dlang.org/show_bug.cgi?id=13541

Comments

Comment #0 by moonlightsentinel — 2022-03-27T17:32:09Z
WindowsExceptions ctor is not marked as nothrow because it may throw an exception e.g. due to the UTF16 => UTF8 construction. But an exception thrown from the ctor would hide the actual error message!
Comment #1 by dlang-bot — 2022-03-27T17:39:16Z
@MoonlightSentinel created dlang/phobos pull request #8421 "Fix 22946 - Mark WindowsException ctor as nothrow" fixing this issue: - Fix 22946 - Mark WindowsException ctor as nothrow Catch possible exceptions arising from e.g. UTF decoding and ensure that the message buffer doesn't contain partial output from a failed step. The logic is seperated into a dedicated method because it's required for another bugfix. https://github.com/dlang/phobos/pull/8421
Comment #2 by dlang-bot — 2022-03-27T22:15:14Z
dlang/phobos pull request #8421 "Fix 22946 - Mark WindowsException ctor as nothrow" was merged into master: - 21cb2a3b6241b9aac1067a1d898b0259097dd524 by MoonlightSentinel: Fix 22946 - Mark WindowsException ctor as nothrow Catch possible exceptions arising from e.g. UTF decoding and ensure that the message buffer doesn't contain partial output from a failed step. The logic is seperated into a dedicated method because it's required for another bugfix. https://github.com/dlang/phobos/pull/8421