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

Consider storing a more direct source_location in error_codes #1061

Open
grisumbras opened this issue Dec 16, 2024 · 0 comments
Open

Consider storing a more direct source_location in error_codes #1061

grisumbras opened this issue Dec 16, 2024 · 0 comments

Comments

@grisumbras
Copy link
Member

Currently error_code stores the location of the most inner code that sets the error (the place where the error is first discovered). But there's an argument, that it should instead store the topmost location where the error is discovered.

Peter Dimov:

the point here is that in general, the location should point to the call that failed, not inside of it
if an OS API call fails, the location points to where it was issued, not to the OS source
here the call that fails is try_as_array
not something called inside of it

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

1 participant