[Issue 13541] std.windows.syserror.sysErrorString() should be nothrow
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 27 19:07:37 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13541
Marco Leise <Marco.Leise at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Marco.Leise at gmx.de
--- Comment #1 from Marco Leise <Marco.Leise at gmx.de> ---
That recursion is really bad. :p
> 1. sysErrorString()'s argument should ONLY be values returned by Windows APIs like GetLastError(), and so this should always succeed.
It should, yes. And that's surely Microsofts stance as well. Yet they state
that 0 is returned on error, so if this was my code I would at least handle
that case and print some generic English message like "Failed to retrieve
WinAPI error message for code 0x123456" instead of an empty string.
--
More information about the Digitalmars-d-bugs
mailing list