godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.3k stars 21.24k forks source link

ResourceLoader: Report appropriate error code when no suitable loader is found #99494

Open RandomShaper opened 1 day ago

RandomShaper commented 1 day ago

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:

If the file exists, then this PR will then do report ERR_FILE_UNRECOGNIZED.

Fixes #95490.