MCPcopy Create free account
hub / github.com/dermesser/libsocket / socket_exception

Class socket_exception

headers/exception.hpp:52–64  ·  view source on GitHub ↗

* @brief This class is instantiated and thrown when an error occurs. * If there's an error somewhere in libsocket++, the function in which the error * occurs /always/ throws a `socket_exception` object showing why the error * occurred. */

Source from the content-addressed store, hash-verified

50 * occurred.
51 */
52struct socket_exception {
53 int err; //!< This is the value of errno when the error occurred.
54 string mesg; //!< This is the message, showing file, line and a
55 //!< description. If your program is verbose, simply print it
56 //!< to STDERR. It contains 1. why the error occurred 2. in
57 //!< which file it occurred 3. in which line it occurred. It's
58 //!< a bit like rsync. A typical message looks like the
59 //!< following one: "../C++/inetclientstream.cpp:167:
60 //!< <<(std::string) output: Socket not connected!"
61
62 socket_exception(const string& file, int line, const string& message,
63 bool show_errno = true);
64};
65/**
66 * @}
67 */

Callers 15

waitMethod · 0.85
epollsetMethod · 0.85
add_fdMethod · 0.85
del_fdMethod · 0.85
waitMethod · 0.85
rcvMethod · 0.85
dgramclient.cppFile · 0.85
sndMethod · 0.85
rcvmsgMethod · 0.85
receive_headerMethod · 0.85
connectMethod · 0.85
setupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected