Open
Description
openedon Sep 25, 2024
Rather than folding all error types into the windows_result::Error
type, APIs can more specifically return Result<T, HRESULT>
, Result<T, NTSTATUS>
, and so on. This would avoid the overhead that necessitated #3126 and allow simple pattern matching for error handling. The reasoning around the Windows-specific Result<T, Error>
is that it additionally carries any IErrorInfo
that may have been associated with the calling thread. This turns out to be used by very few APIs but can still be supported as needed through conversion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment