$darkmode
#include <tcp_transceiver.hpp>
Public Member Functions | |
| Error (std::string_view what) | |
| template<typename... Args> | |
| Error (std::string_view format, Args &&... args) | |
Public Member Functions inherited from cloe::Error | |
| Error (std::string_view what) | |
| template<typename... Args> | |
| Error (std::string_view format, Args &&... args) | |
| const char * | what () const noexcept override |
| bool | has_explanation () const |
| void | set_explanation (std::string explanation) |
| template<typename... Args> | |
| void | set_explanation (std::string_view format, Args &&... args) |
| const std::string & | explanation () const |
| Error | explanation (std::string explanation) && |
| template<typename... Args> | |
| Error | explanation (std::string_view format, Args &&... args) && |
TcpReadError may be thrown when there is an error during reading. It should be used something like this:
tcp_stream_.read(&msg, msg_size)
if (!tcp_stream_) {
throw TcpReadError(tcp_stream_.error().message());
}