Skip to content

In the UndefVarError(::Symbol) constructor, set scope to nothing #54083

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

Closed
wants to merge 1 commit into from

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Apr 14, 2024

Fixes #54082
Alternative to #54084


This is one possible way to fix #54082.

Before this PR, if the UndefVarError(::Symbol) constructor is called, the scope field is left undefined.

After this PR, if the UndefVarError(::Symbol) constructor is called, the scope field is set to nothing.

@DilumAluthge
Copy link
Member Author

I think that this PR will also not fix #54082, for the reason described in #54084 (comment).

@DilumAluthge
Copy link
Member Author

Because with this PR, expected_exception.scope would be nothing (instead of #undef), but thrown_exception.scope would be neither nothing nor #undef, so expected_exception would still be not equal to thrown_exception.

@vtjnash vtjnash deleted the dpa/UndefVarError-scope-nothing branch October 18, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change in behavior of UndefVarError(::Symbol) constructor breaks @test_throws in 1.11.0-beta1
1 participant