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!
@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
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