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

Improve error message when instantiating virtual class #53431

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

MaxLap
Copy link
Contributor

@MaxLap MaxLap commented Oct 5, 2021

So, I just landed on this error: Condition "!ti->creation_func" is true. Returned: __null

Looking for it, I only found godotengine/godot-docs#3460, which kind of helps, but is about a very different situation.

I ended up figuring that I can't inherit from CanvasItem which isn't something you'd think since Node2D and Control do inherit from it. I just added a message to clarify that situation: "Class '" + String(p_class) + "' or its base class cannot be instantiated.

Should make figuring out the issue easier.

@MaxLap MaxLap requested a review from a team as a code owner October 5, 2021 12:24
@akien-mga akien-mga added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:core labels Oct 5, 2021
@akien-mga akien-mga added this to the 4.0 milestone Oct 5, 2021
@akien-mga akien-mga merged commit 3ae1d2d into godotengine:master Oct 5, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Oct 6, 2021
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.

2 participants