One difference worth mentioning compared to the reverted PR is that, in order to make a simpler diff, reporting the file doesn't
exist is more prioritary than telling the extension is unknown. I don't think we have reasons to prefer one over the other.
E.g., loading thing.aaa, which doesn't exist:
Old PR: ERR_FILE_UNRECOGNIZED.
This PR: ERR_FILE_NOT_FOUND.
If the file exists, then this PR will then do report ERR_FILE_UNRECOGNIZED.
New version of the reverted #97370.
One difference worth mentioning compared to the reverted PR is that, in order to make a simpler diff, reporting the file doesn't exist is more prioritary than telling the extension is unknown. I don't think we have reasons to prefer one over the other.
E.g., loading
thing.aaa
, which doesn't exist:ERR_FILE_UNRECOGNIZED
.ERR_FILE_NOT_FOUND
.If the file exists, then this PR will then do report
ERR_FILE_UNRECOGNIZED
.Fixes #95490.