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

Add Engine.print_error_messages property to disable printing errors #48359

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 1, 2021

This can be used during unit test suite runs to hide error and warning messages.

Care should be taken when using this feature, as it can hide important information if used wrongly.

This closes godotengine/godot-proposals#1763.

This can be used during unit test suite runs to hide error and warning
messages.

Care should be taken when using this feature, as it can hide important
information if used wrongly.
@Calinou Calinou requested review from a team as code owners May 1, 2021 21:13
<member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true">
If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.
[b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default).
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
Copy link
Member Author

@Calinou Calinou May 1, 2021

Choose a reason for hiding this comment

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

I looked around briefly and didn't see a way to change this without impacting the script error behavior (i.e. GDScript syntax errors).

@akien-mga akien-mga merged commit cca29b7 into godotengine:master Jun 20, 2021
@akien-mga
Copy link
Member

Thanks!

Xrayez added a commit to goostengine/godot that referenced this pull request Jul 20, 2021
Backports godotengine#48359 to 3.x.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
@Calinou Calinou deleted the add-engine-print-error-property branch August 3, 2021 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to temporarily disable error printing in the engine
3 participants