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

Bad error message for missing end #476

Open
oscardssmith opened this issue Jul 26, 2024 · 1 comment
Open

Bad error message for missing end #476

oscardssmith opened this issue Jul 26, 2024 · 1 comment

Comments

@oscardssmith
Copy link
Member

Right now the error for missing an end in otherwise good code is

ERROR: LoadError: ParseError:
# Error @ /home/oscardssmith/.julia/dev/OrdinaryDiffEq/src/derivative_utils.jl:766:5
    end
end
#  
└ ── Expected `end`

The problem here is that the error location reported is just the end of the file (since everything else could be correct up to that point). It would be much better if the error instead (or in addition) pointed to the line requiring an end from which an end was missing since this line will generally be much more useful for figuring out where the missing end is supposed to go.

@pfitzseb
Copy link
Member

Would also be useful to print the block opener, maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants