Issue 22946 - WindowsException ctor is not nothrow
Summary: WindowsException ctor is not nothrow
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All Windows
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-03-27 17:32 UTC by moonlightsentinel
Modified: 2022-03-27 22:15 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description moonlightsentinel 2022-03-27 17:32:09 UTC
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 Dlang Bot 2022-03-27 17:39:16 UTC
@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 Dlang Bot 2022-03-27 22:15:14 UTC
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