
1 Jul
2010
1 Jul
'10
9:03 p.m.
On 1 July 2010 22:32, Lloyd
Hi,
How can I interpret and use the error_code in my application?
As an example my ASIO async_read "handler function" receives one argument as error, as shown below
void MyClass::AsyncReadHandler(const boost::system::error_code& error,std::size_t bytes_transferred) { }
[...]
So how can I get the respective "enum" associated with the error
Thanks a lot, Lloyd
Hi Lloyd, I think you mean: if (error == boost::asio::error::operation_aborted) {...} see Boost\include\boost-1_43\boost\asio\error.hpp for the asio enums (and how to add your own errors).