Ignore ERR_FILE_CANT_OPEN error when loading#90269
Ignore ERR_FILE_CANT_OPEN error when loading#90269akien-mga merged 1 commit intogodotengine:masterfrom
ERR_FILE_CANT_OPEN error when loading#90269Conversation
d5a111e to
f0cbd38
Compare
ERR_FILE_CANT_OPEN error when loading
|
I believe that |
|
Still, if a dependency is corrupted, the scene should open as if it was missing. The only unrecoverable case should be when the scene itself can't be loaded. |
|
Should we consider printing unexpected error code without returning early, so loading a scene always recovers gracefully from a broken dep? |
|
I tried looking for the source of invalid error, but the code is too tangled >_> It comes from some thread function.
Not sure what do you mean by that. The condition I modified makes the method not return. I could print the error if it's in the list of exceptions, but loading the scene already fills output with errors, so I think it's clearly communicated. |
|
Nevermind, I found the source: godot/scene/resources/shader.cpp Lines 233 to 235 in 655e93d The loader either returns OK or ERR_FILE_CANT_OPEN. I think it could return the error from FileAccess operation. I found the same code in some other loaders. Should I change them? |
|
Not sure if we should change those, maybe. We need to harmonize our error reporting so that we use errors more purposely if we have checks that rely on specific error codes. Either way, for the time being I think this PR makes it better. |
|
Thanks! |
|
Cherry-picked for 4.2.2. |
Follow-up to #85159
Fixes #80324
I didn't try to find out why there is yet another error for missing files, but my guess is that different loaders just return inconsistent values.