Exception In boost-beast

I use Boost::Beast and i got somme exception message for exemple : resolve: No such host is known.
I want in my code to print i message more significant that can a simple user get a idea what this message means .
how i can do that?

that is the exemple that i chose to work with in the first but thy don’t work for me

 if (ec && ec != beast::errc::not_connected) {
      beast::system_error{ ec };
      std::cout << "beast::errc::not_connected" << ec << " with explanatory message " << ec.message() << std::endl;
    }
    if (ec && ec != beast::errc::no_buffer_space) {
      beast::system_error{ ec };
      std::cout << "beast::errc::no_buffer_space" << ec << " with explanatory message " << ec.message() << std::endl;

    }
    if (ec && ec != beast::errc::timed_out) {
      beast::system_error{ ec };
      std::cout << "beast::errc::timed_out" << ec << " with explanatory message " << ec.message() << std::endl;

    }
    if (ec && ec != beast::errc::no_buffer_space) {
      beast::system_error{ ec };
      std::cout << "beast::errc::no_buffer_space" << ec << " with explanatory message " << ec.message() << std::endl;

    }
    if (ec && ec != beast::errc::stream_timeout) {
      beast::system_error{ ec };
      std::cout << "beast::errc::stream_timeout" << ec << " with explanatory message " << ec.message() << std::endl;

    }

Source: Windows Questions C++

LEAVE A COMMENT