Public Member Functions | |
NNetworkException (const NString &desc, const NString &host, Module module, Flag flag=UNHANDLED_EXCEPTION) | |
Constructs a NNetworkException object. | |
NString | getHost (void) const |
Gets the hostname associated with the exception. | |
Static Public Attributes | |
static const Flag | UNHANDLED_EXCEPTION = 1 |
static const Flag | DNS_HOST_UNKNOWN = 2 |
static const Flag | DNS_TRY_AGAIN = 3 |
static const Flag | DNS_NO_ADDRESS = 4 |
static const Flag | DNS_NO_RECOVERY = 5 |
static const Flag | SOCKET_INIT_FAILED = 6 |
static const Flag | CONNECTION_FAILED = 7 |
static const Flag | SOCK_ERROR = 8 |
Protected Attributes | |
NString | m_host |
Flag | m_flag |
Definition at line 36 of file nnetworkexception.h.
NNetworkException | ( | const NString & | desc, | |
const NString & | host, | |||
Module | module, | |||
Flag | flag = UNHANDLED_EXCEPTION | |||
) |
Constructs a NNetworkException object.
desc | Exception description | |
host | An optional hostname associated to the exception | |
module | The module in which the exception occurred | |
flag | An unique id, as provided by the enum Flag, that identifies the error that occurred |
Definition at line 33 of file nnetworkexception.cpp.
NString getHost | ( | void | ) | const |
Gets the hostname associated with the exception.
Definition at line 42 of file nnetworkexception.cpp.
References m_host.
DllDeclSpec const Flag UNHANDLED_EXCEPTION = 1 [static] |
Unhandled exception
Definition at line 38 of file nnetworkexception.h.
DllDeclSpec const Flag DNS_HOST_UNKNOWN = 2 [static] |
Host not found
Definition at line 39 of file nnetworkexception.h.
DllDeclSpec const Flag DNS_TRY_AGAIN = 3 [static] |
Try again
Definition at line 40 of file nnetworkexception.h.
DllDeclSpec const Flag DNS_NO_ADDRESS = 4 [static] |
Un-assigned ip to the address
Definition at line 43 of file nnetworkexception.h.
DllDeclSpec const Flag DNS_NO_RECOVERY = 5 [static] |
Unrecoverable error
Definition at line 44 of file nnetworkexception.h.
DllDeclSpec const Flag SOCKET_INIT_FAILED = 6 [static] |
Socket initialization failed
Definition at line 46 of file nnetworkexception.h.
Referenced by NTcpSocket::connectToHost(), NTcpSocket::open(), and NTcpSocket::waitForConnected().
DllDeclSpec const Flag CONNECTION_FAILED = 7 [static] |
Connection failed or refused
Definition at line 47 of file nnetworkexception.h.
Referenced by NTcpSocket::connectToHost().
DllDeclSpec const Flag SOCK_ERROR = 8 [static] |
Internal socket error
Definition at line 49 of file nnetworkexception.h.
Referenced by NTcpSocket::read(), and NTcpSocket::readLine().