MRT's IMapView::Lookup implementation returns ERROR_PATH_NOT_FOUND if the resource lookup fails, which causes the TryLookup projection to throw for this "expected" error case. Changing the MRT implementation would break callers that depend on this behavior, so the TryLookup projection could instead handled this alongside the existing ERROR_FILE_NOT_FOUND handler that was added for this bug:
Version
No response
Summary
MRT's IMapView::Lookup implementation returns ERROR_PATH_NOT_FOUND if the resource lookup fails, which causes the
TryLookup
projection to throw for this "expected" error case. Changing the MRT implementation would break callers that depend on this behavior, so the TryLookup projection could instead handled this alongside the existing ERROR_FILE_NOT_FOUND handler that was added for this bug:https://github.com/microsoft/cppwinrt/issues/685
Reproducible example
No response
Expected behavior
No response
Actual behavior
No response
Additional comments
No response