boostorg / boostorg/json

Slight innacuracy in `ip_address` `try_value_to` example

Open
#1,124 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

```
boost::system::result< unsigned char > oct1
= try_value_to< unsigned char >( arr[0] );
if( !oct1 )
return make_error_code( std::errc::invalid_argument );
```
This should be
```
if( !oct1 )
return oct1.error();
```
so as to not discard the error returned from the nested `try_value_to` (which is going to be more informative and may include a source location).

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.