NNetworkException Class Reference

NNetworkException is the object used for network-related exceptions. More...

Inheritance diagram for NNetworkException:

NException

List of all members.

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


Detailed Description

NNetworkException is the object used for network-related exceptions.
Examples:

clientapp.cpp.

Definition at line 36 of file nnetworkexception.h.


Constructor & Destructor Documentation

NNetworkException ( const NString desc,
const NString host,
Module  module,
Flag  flag = UNHANDLED_EXCEPTION 
)

Constructs a NNetworkException object.

Parameters:
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.


Member Function Documentation

NString getHost ( void   )  const

Gets the hostname associated with the exception.

Returns:
The hostname associated with the exception

Definition at line 42 of file nnetworkexception.cpp.

References m_host.


Member Data Documentation

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().

NString m_host [protected]

The hostname

Definition at line 69 of file nnetworkexception.h.

Referenced by getHost().

Flag m_flag [protected]

The error flag

Reimplemented from NException.

Definition at line 70 of file nnetworkexception.h.


The documentation for this class was generated from the following files:
Generated on Wed Mar 5 23:10:37 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4