Skip to content

Add a proper error message when trying to add node to a group with an empty name #107375

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

Merged
merged 1 commit into from
Jun 22, 2025

Conversation

suhankins
Copy link
Contributor

@suhankins suhankins commented Jun 10, 2025

Right now, if you try to add a node to a group with an empty name, you will get a very unhelpful error
Condition "!p_identifier.operator String().length()" is true.

This pull request adds an error message "Tried to add node to a group with an empty name."

Minimal reproduction build:
error-message-test.zip

@suhankins suhankins requested a review from a team as a code owner June 10, 2025 18:26
@suhankins suhankins changed the title Add an error message to length check Add a proper error message when trying to add node to a group with an empty name Jun 10, 2025
Copy link
Contributor

@AdrienUfferte AdrienUfferte left a comment

Choose a reason for hiding this comment

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

Simple and effective. This is my first review, do not take it into account like an experimented one!

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

Good idea!
Wording sounds good to me.

@Ivorforce Ivorforce added this to the 4.5 milestone Jun 10, 2025
@Ivorforce Ivorforce requested a review from a team June 10, 2025 19:13
@Repiteo Repiteo modified the milestones: 4.5, 4.6 Jun 19, 2025
@akien-mga
Copy link
Member

Looks good! Could you squash the commits? See PR workflow for instructions.

@suhankins
Copy link
Contributor Author

Looks good! Could you squash the commits? See PR workflow for instructions.

Hopefully I did it correctly.

@akien-mga
Copy link
Member

akien-mga commented Jun 21, 2025

Mostly good, but you kept the message of the last commit instead of the first one, so it's not fully accurate.
It would be better to change it to "Add a proper error message when trying to add node to a group with an empty name" like the PR's title (and no need to mention reviewers or add as co-authors for such small edits :)).

You can change the commit message with git commit --amend and the git push --force.

@suhankins
Copy link
Contributor Author

Mostly good, but you kept the message of the last commit instead of the first one, so it's not fully accurate. It would be better to change it to "Add a proper error message when trying to add node to a group with an empty name" like the PR's title (and no need to mention reviewers or add as co-authors for such small edits :)).

You can change the commit message with git commit --amend and the git push --force.

Okay, thank you. Should be good now.

@akien-mga akien-mga modified the milestones: 4.6, 4.5 Jun 21, 2025
@akien-mga akien-mga merged commit 6ff0616 into godotengine:master Jun 22, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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.

6 participants