|
Boost Users : |
Subject: Re: [Boost-users] using system:error_code
From: Eric MALENFANT (Eric.Malenfant_at_[hidden])
Date: 2010-07-06 11:20:20
De: Lloyd
>
> Thanks for this useful link. I have checked boost::system::error,
> boost::asio::error, but could not find a solution to my problem.
>
> I am writing to a file using async_write_some(). If an error occurs,
> how can
> check whether the disk is full or not? A one or two line code will be
> very
> useful.
>
Something like (warning, untested):
void write_handler(const boost::system::error_code& ec, std::size_t
bytes_transferred)
{
if (ec == boost::system::errc::no_space_on_device){
// ...
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net