-
Notifications
You must be signed in to change notification settings - Fork 718
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 a diagnostic dialog for missing variables #6573
Conversation
RaiseError(gd::ExpressionParserError::ErrorType::MissingBehavior, | ||
_("This behavior is not attached to this object."), | ||
function.behaviorNameLocation, | ||
/*isFatal=*/false, function.behaviorName, function.objectName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we have the behavior name but not the expected type. It would be hard to build an understandable message so it's not forwarded to the report.
I think it's fine because behaviors instructions will likely be used too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
return gd::make_unique<ExpressionParserDiagnostic>(); | ||
return std::unique_ptr<ExpressionParserError>(nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not just a refactoring. It was wrongly replacing the null pointer with a default constructed instance.
When removing the base class with IsError() { return false }
, it returned true
which causes bugs.
IsError()
no longer exists, only null is checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix 👍 Much better
Changes