homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Raúl Núñez de Arenas, berker.peksag, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019年05月01日.18:28:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556735305.17.0.66499157398.issue26493@roundup.psfhosted.org>
In-reply-to
Content
> I suspect that we've not used the flags in those ones because we 
> think we *can* properly format the message, so fixing the use of 
> inserts is a better option than simply going back to the 
> unformatted message.
We're advised that it's "unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS". We don't control the content of system error messages. If we get the number and type of arguments wrong for the message inserts, then FormatMessageW may fail with an invalid parameter error, as it does in the examples I showed, or return nonsense, or even crash the process due to an unhandled access violation. 
Also, nothing was implemented in _overlapped.FormatMessage or _ctypes.FormatError to special case an `Arguments` array for particular error codes, or even to expose this capability to Python code. I think omitting the flag was just a mistake.
History
Date User Action Args
2019年05月01日 18:28:25eryksunsetrecipients: + eryksun, paul.moore, tim.golden, berker.peksag, zach.ware, steve.dower, Raúl Núñez de Arenas
2019年05月01日 18:28:25eryksunsetmessageid: <1556735305.17.0.66499157398.issue26493@roundup.psfhosted.org>
2019年05月01日 18:28:25eryksunlinkissue26493 messages
2019年05月01日 18:28:25eryksuncreate

AltStyle によって変換されたページ (->オリジナル) /