* @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. */
| 50 | * occurred. |
| 51 | */ |
| 52 | struct 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 | */ |
no outgoing calls
no test coverage detected