json icon indicating copy to clipboard operation
json copied to clipboard

Consider storing a more direct source_location in error_codes

Open grisumbras opened this issue 1 year ago • 0 comments

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

grisumbras avatar Dec 16 '24 10:12 grisumbras