NetworkException Class Reference

#include <NetworkEx.h>

List of all members.

Public Types

enum  ExceptionCode {
  invalid_address = 0, invalid_host, invalid_network, invalid_service,
  read_failed, write_failed, socket_path_exceeded, eof_encountered,
  system_call_failure, system_call_timout
}

Public Member Functions

 NetworkException (ExceptionCode code, const char *note, long native=0)
ExceptionCode getErrorCode () const throw ()
long getNativeErrorCode () const throw ()
virtual const char * what () const throw ()

Static Public Member Functions

static void throwNetworkException (ExceptionCode code, const char *message="")
static void throwNetworkException (ExceptionCode code, long nativeError)
static const char * getErrorSymbol (long code)
static const char * getErrorDescription (long code)

Private Attributes

ExceptionCode exceptionCode
long nativeCode


Detailed Description

TcpServer Socket library

Copyright (c) 2000 Jasen Plietz All rights reserved.

No warranties are extended. Use at your own risk.

To contact the author with suggestions or comments, use Jasen@plietz.net

Definition at line 29 of file NetworkEx.h.


Member Enumeration Documentation

enum NetworkException::ExceptionCode
 

Enumerator:
invalid_address 
invalid_host 
invalid_network 
invalid_service 
read_failed 
write_failed 
socket_path_exceeded 
eof_encountered 
system_call_failure 
system_call_timout 

Definition at line 32 of file NetworkEx.h.


Constructor & Destructor Documentation

NetworkException::NetworkException ExceptionCode  code,
const char *  note,
long  native = 0
 

Definition at line 48 of file NetworkEx.cpp.

Referenced by throwNetworkException().


Member Function Documentation

NetworkException::ExceptionCode NetworkException::getErrorCode  )  const throw ()
 

Definition at line 54 of file NetworkEx.cpp.

References exceptionCode.

Referenced by what().

const char * NetworkException::getErrorDescription long  code  )  [static]
 

Definition at line 95 of file NetworkEx.cpp.

References NetworkExceptions.

Referenced by what().

const char * NetworkException::getErrorSymbol long  code  )  [static]
 

To Do: Make these private members and use the facet message catalog of C++ as soon as you can figure out how to use it

Definition at line 87 of file NetworkEx.cpp.

References NetworkExceptions.

Referenced by throwNetworkException().

long NetworkException::getNativeErrorCode  )  const throw ()
 

Definition at line 61 of file NetworkEx.cpp.

References nativeCode.

void NetworkException::throwNetworkException ExceptionCode  code,
long  nativeError
[static]
 

Definition at line 80 of file NetworkEx.cpp.

References getErrorSymbol(), and NetworkException().

void NetworkException::throwNetworkException ExceptionCode  code,
const char *  message = ""
[static]
 

Definition at line 72 of file NetworkEx.cpp.

References NetworkException().

Referenced by ConnectableSocket::read(), IpAddress::set(), Host::set(), and ConnectableSocket::write().

const char * NetworkException::what  )  const throw () [virtual]
 

Definition at line 66 of file NetworkEx.cpp.

References getErrorCode(), and getErrorDescription().

Referenced by processSocket().


Member Data Documentation

ExceptionCode NetworkException::exceptionCode [private]
 

Definition at line 92 of file NetworkEx.h.

Referenced by getErrorCode().

long NetworkException::nativeCode [private]
 

Definition at line 93 of file NetworkEx.h.

Referenced by getNativeErrorCode().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 09:10:16 2006 for Simple SOAP by  doxygen 1.4.6