[ASIO/System] Checking error_code

Dears, sorry for disturbing with peraphs stupid question, but I'm really hung: I'm not able to check the error code (boost::system::error_code) for a specific 'End of File' type. When I print it, it's 'End of file', with int value = 2. But how to check it? I tried with something like: if (error.default_error_condition() == boost::system::error_condition(boost::system::errc::XXX)) { ... } But I don't know what to put in the XXX. Br and thanks, \Carlo Medas

Hi,
sorry for disturbing with peraphs stupid question, but I'm really hung: I'm not able to check the error code (boost::system::error_code) for a specific 'End of File' type.
When I print it, it's 'End of file', with int value = 2.
But how to check it?
I tried with something like:
if (error.default_error_condition() == boost::system::error_condition(boost::system::errc::XXX)) { ... }
But I don't know what to put in the XXX.
Br and thanks,
Try it err != boost::asio::error::eof From asio example. Best Regards, Sergei

Thank you very much. I was trying hard to find a matching error in the system library... Thanks again, \C On Wed, Oct 29, 2008 at 12:31 PM, Sergei Politov <spolitov@gmail.com> wrote:
Hi,
sorry for disturbing with peraphs stupid question, but I'm really hung: I'm not able to check the error code (boost::system::error_code) for a specific 'End of File' type.
When I print it, it's 'End of file', with int value = 2.
But how to check it?
I tried with something like:
if (error.default_error_condition() == boost::system::error_condition(boost::system::errc::XXX)) { ... }
But I don't know what to put in the XXX.
Br and thanks,
Try it
err != boost::asio::error::eof
From asio example.
Best Regards, Sergei _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Carlo Medas
-
Sergei Politov