Skip to content

Slight innacuracy in ip_address try_value_to example #1124

@pdimov

Description

@pdimov
    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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions