Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

cException Class Reference

#include <cexception.h>

Inheritance diagram for cException::

cEndModuleException cTerminationException List of all members.

Public Methods

Constructors
 cException ()
 cException (int errcode,...)
 cException (const char *msg,...)
 cException (const cObject *where, int errcode,...)
 cException (const cObject *where, const char *msg,...)
Getting exception info
int errorCode ()
const char* message ()
const char* moduleFullPath ()
int moduleID ()

Protected Methods

void init (const cObject *obj, int errc, const char *fmt, va_list va)

Detailed Description

Exception class.


Constructor & Destructor Documentation

cException::cException ( )
 

Default constructor.

cException::cException ( int errcode,
... )
 

Error is identified by an error code, and the message comes from a string table. The error string may expect printf-like arguments (s, d) which also have to be passed to the constructor.

cException::cException ( const char * msg,
... )
 

To be called like printf(). The error code is set to eCUSTOM.

cException::cException ( const cObject * where,
int errcode,
... )
 

Error is identified by an error code, and the message comes from a string table. The error string may expect printf-like arguments (s, d) which also have to be passed to the constructor. The 1st arg is the object where the error occurred: its class and object name will be prepended to the message like this: "(cArray)arr".

cException::cException ( const cObject * where,
const char * msg,
... )
 

To be called like printf(). The error code is set to eCUSTOM. The 1st arg is the object where the error occurred: its class and object name will be prepended to the message like this: "(cArray)arr".


Member Function Documentation

int cException::errorCode ( ) [inline]
 

Returns the error code.

void cException::init ( const cObject * obj,
int errc,
const char * fmt,
va_list va ) [protected]
 

Helper function for constructors: assembles and stores the message text. If obj is non-NULL, the message text will be prepended (if needed) with the object type and name, like this: "(cArray)array: ..."

const char * cException::message ( ) [inline]
 

Returns the text of the error.

const char * cException::moduleFullPath ( ) [inline]
 

Returns the full path of the module where the exception occurred.

int cException::moduleID ( ) [inline]
 

Returns the ID of the module where the exception occurred, or -1 if it was not inside a module. The module may not exist any more when the exception is caught (ie. if the exception occurs during network setup, the network is cleaned up immediately).


The documentation for this class was generated from the following file:
Generated at Mon Jun 16 23:37:32 2003 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001