-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
More help for users when encountering UndefVarError #17062
Labels
error handling
Handling of exceptions by Julia or the user
good first issue
Indicates a good issue for first-time contributors to Julia
Hacktoberfest
Good for Hacktoberfest participants
help wanted
Indicates that a maintainer wants help on an issue or pull request
Comments
ivarne
added
help wanted
Indicates that a maintainer wants help on an issue or pull request
error handling
Handling of exceptions by Julia or the user
good first issue
Indicates a good issue for first-time contributors to Julia
labels
Jun 22, 2016
Is there levenshtein distance already in Base? |
Yup, there's one here. |
Finding similar function names (based on levens |
This was referenced Apr 5, 2018
vtjnash
added a commit
that referenced
this issue
Oct 31, 2023
Record the 'scope' of the variable that was undefined (the Module, or a descriptive word such as :local or :static_parameter). Add that scope to the error message, and expand the hint suggestions added by the REPL to include more specific advice on common mistakes: - forgetting to set an initial value - forgetting to import a global - creating a local of the same name as a global - not matching a static parameter in a signature subtype Fixes #17062 (although more could probably be done to search for typos using REPL.string_distance and getting the method from stacktrace) Fixes #18877 Fixes #25263 Fixes #35126 Fixes #39280 Fixes #41728 Fixes #48731 Fixes #49917 Fixes #50369
vtjnash
added a commit
that referenced
this issue
Nov 8, 2023
Record the 'scope' of the variable that was undefined (the Module, or a descriptive word such as :local or :static_parameter). Add that scope to the error message, and expand the hint suggestions added by the REPL to include more specific advice on common mistakes: - forgetting to set an initial value - forgetting to import a global - creating a local of the same name as a global - not matching a static parameter in a signature subtype Fixes #17062 (although more could probably be done to search for typos using REPL.string_distance and getting the method from stacktrace) Fixes #18877 Fixes #25263 Fixes #35126 Fixes #39280 Fixes #41728 Fixes #48731 Fixes #49917 Fixes #50369
vtjnash
added a commit
that referenced
this issue
Nov 8, 2023
Record the 'scope' of the variable that was undefined (the Module, or a descriptive word such as :local or :static_parameter). Add that scope to the error message, and expand the hint suggestions added by the REPL to include more specific advice on common mistakes: - forgetting to set an initial value - forgetting to import a global - creating a local of the same name as a global - not matching a static parameter in a signature subtype Fixes #17062 (although more could probably be done to search for typos using REPL.string_distance and getting the method from stacktrace) Fixes #18877 Fixes #25263 Fixes #35126 Fixes #39280 Fixes #41728 Fixes #48731 Fixes #49917 Fixes #50369
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
good first issue
Indicates a good issue for first-time contributors to Julia
Hacktoberfest
Good for Hacktoberfest participants
help wanted
Indicates that a maintainer wants help on an issue or pull request
The printing of
UndefVarError
is very minimalistic and can be improved to look for common mistakes.I opened the similar issue #7512 a while ago, but it was hard to find a general solution.
Ref #17046 (comment), and cc @tknopp
The text was updated successfully, but these errors were encountered: