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

Non explicit error message when setting active a Viewport that is already active #50382

Closed
Tracked by #42719
Flarkk opened this issue Jul 11, 2021 · 0 comments · Fixed by #50392
Closed
Tracked by #42719

Non explicit error message when setting active a Viewport that is already active #50382

Flarkk opened this issue Jul 11, 2021 · 0 comments · Fixed by #50392

Comments

@Flarkk
Copy link
Contributor

Flarkk commented Jul 11, 2021

Godot version

4.0 dev, 3.x

System information

All

Issue description

When calling VisualServer::viewport_set_active(viewport, true) on a Viewport that is already active, the engine prints the following non explicit error message (tested with Godot 3.1.2, but true on all 3.x and 4.0-dev) :

E 0:00:05:0437   Condition ' active_viewports.find(viewport) != -1 ' is true.
  <C Source>     servers/visual/visual_server_viewport.cpp:369 @ viewport_set_active()

This message is triggered as following (see actual code) :
ERR_FAIL_COND(active_viewports.find(viewport) != -1); //already active

The message should be more explicit, for instance Can't make active a Viewport that is already active.
By the way I'm wondering if any error is supposed to be raised at all here (should be preferable not to fail and do nothing silently ?)

Steps to reproduce

Make active any Viewport that is already active.

Minimal reproduction project

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants