Consider storing a more direct source_location in error_codes
Open
- Dominant language
- C++
- Stars
- 479
- Forks
- 110
- Avg merge
- 10d 3h
- Merged PRs (30d)
- 5
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.