Skip to content
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

Report staging load errors #518

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

Malcolmnixon
Copy link
Collaborator

This pull request implements #416 by adding code to report stage load errors by:

  • Writing an error message to the log-file and console
  • Breaking in the debugger (if present)
  • Terminating the application with a non-zero exit code

Testing of a bad stage-load resulted in the following error output to the console:

ERROR: Cannot open file 'res://scenes/poke_demo/poke_demo_bad.tscn'.
   at: (scene/resources/resource_format_text.cpp:1659)
ERROR: Failed loading resource: res://scenes/poke_demo/poke_demo_bad.tscn. Make sure resources have been imported by opening the project in the editor at least once.
   at: (core/io/resource_loader.cpp:222)
ERROR: Error 2 loading resource res://scenes/poke_demo/poke_demo_bad.tscn
   at: push_error (core/variant/variant_utility.cpp:903)

The following was also written to the log file:

USER ERROR: Cannot open file 'res://scenes/poke_demo/poke_demo_bad.tscn'.
   at: load (scene/resources/resource_format_text.cpp:1659)
USER ERROR: Failed loading resource: res://scenes/poke_demo/poke_demo_bad.tscn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:222)
USER ERROR: Error 2 loading resource res://scenes/poke_demo/poke_demo_bad.tscn
   at: push_error (core/variant/variant_utility.cpp:903)

@Malcolmnixon Malcolmnixon added this to the 4.3.0 milestone Sep 6, 2023
Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Add reporting of stage load errors by writing to log-file, writing to console, breaking in the debugger, and quitting with a non-zero exit code.
@Malcolmnixon Malcolmnixon merged commit 8d77446 into GodotVR:master Oct 8, 2023
2 checks passed
@Malcolmnixon Malcolmnixon deleted the staging-load-error branch October 8, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants