boostorg / boostorg/json

Consider storing a more direct source_location in error_codes

Open
#1,061 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.