I\'m catching errors in Boost Asio program like
if (!error) { //do stuff } else { std::cout << \"Error : \" << error << std::endl;
If you are likely using boost::system::error_code you can call:
boost::system::error_code
error.message()
to get a more human-friendly message.
Using operator<< translates into:
operator<<
os << ec.category().name() << ':' << ec.value()
Here you can check a detailed overview of the available members in error_code.
error_code