forked from boostorg/beast
Use generic_cateogry for errno
This commit is contained in:
@@ -180,8 +180,8 @@ init(beast::error_code& ec)
|
||||
if(! file_)
|
||||
{
|
||||
// Convert the old-school `errno` into
|
||||
// an error code using the system category.
|
||||
ec = beast::error_code{errno, beast::system_category()};
|
||||
// an error code using the generic category.
|
||||
ec = beast::error_code{errno, beast::generic_category()};
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -219,8 +219,9 @@ get(beast::error_code& ec) ->
|
||||
// Handle any errors
|
||||
if(ferror(file_))
|
||||
{
|
||||
// Convert old-school `errno` to error_code
|
||||
ec = beast::error_code(errno, beast::system_category());
|
||||
// Convert the old-school `errno` into
|
||||
// an error code using the generic category.
|
||||
ec = beast::error_code{errno, beast::generic_category()};
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
@@ -350,8 +351,8 @@ init(boost::optional<std::uint64_t> const& content_length, beast::error_code& ec
|
||||
if(! file_)
|
||||
{
|
||||
// Convert the old-school `errno` into
|
||||
// an error code using the system category.
|
||||
ec = beast::error_code{errno, beast::system_category()};
|
||||
// an error code using the generic category.
|
||||
ec = beast::error_code{errno, beast::generic_category()};
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -379,8 +380,9 @@ put(ConstBufferSequence const& buffers, beast::error_code& ec)
|
||||
// Handle any errors
|
||||
if(ferror(file_))
|
||||
{
|
||||
// Convert old-school `errno` to error_code
|
||||
ec = beast::error_code(errno, beast::system_category());
|
||||
// Convert the old-school `errno` into
|
||||
// an error code using the generic category.
|
||||
ec = beast::error_code{errno, beast::generic_category()};
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user