-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore ERR_FILE_CANT_OPEN
error when loading
#90269
Ignore ERR_FILE_CANT_OPEN
error when loading
#90269
Conversation
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.