|
libsocket
|
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.
More...
#include <exception.hpp>
Public Member Functions | |
| socket_exception (const string &file, int line, const string &message, bool show_errno=true) | |
| Constructor of a socket_exception object. More... | |
Public Attributes | |
| int | err |
| This is the value of errno when the error occurred. More... | |
| string | mesg |
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.
Definition at line 52 of file exception.hpp.
| libsocket::socket_exception::socket_exception | ( | const string & | file, |
| int | line, | ||
| const string & | message, | ||
| bool | show_errno = true |
||
| ) |
Constructor of a socket_exception object.
This constructor creates a new socket_exception object.
| f | File in which the error comes (FILE) |
| l | Line (LINE) |
| m | Description of the error. |
Definition at line 67 of file exception.cpp.
| int libsocket::socket_exception::err |
This is the value of errno when the error occurred.
Definition at line 53 of file exception.hpp.
| string libsocket::socket_exception::mesg |
This is the message, showing file, line and a description. If your program is verbose, simply print it to STDERR. It contains 1. why the error occurred 2. in which file it occurred 3. in which line it occurred. It's a bit like rsync. A typical message looks like the following one: "../C++/inetclientstream.cpp:167: <<(std::string) output: Socket not connected!"
Definition at line 54 of file exception.hpp.
1.8.15