xvr2::SystemException Class Reference

#include <xvr2/SystemException.h>

Inheritance diagram for xvr2::SystemException:

Inheritance graph
[legend]

List of all members.


Detailed Description

General platform dependent exception which interfaces with host OS C library error reporting facilities.

Definition at line 24 of file SystemException.h.


Public Member Functions

 SystemException ()
 Default constructor, try not to use it.
 SystemException (OSErrorCodeT error_code)
 This constructor properly initializes the exception based on the error code you report after reading the last OS reported error code.
 SystemException (const SystemException &se)
 Copy contructor takes care of properly initlializing all internal variables by copying their values from the given source exception object.
OSErrorCodeT osErrorCode ()
 Returns the error code's value at the time the exception was thrown.
String osErrorMessage ()
 Returns an String describing a textual representation of the error condition thrown.
int code ()
 Deprecated method, please don't use.
virtual String message ()
 Deprecated method, please don't use.
std::string toString ()
 Displays the description of the exception.
const char * backtrace ()
virtual const char * getClassName ()
 Returns the name of the current class.

Static Public Member Functions

static void enable ()
static void disable ()
static void debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)
 Will print a debug message to the screen.
static void debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)

Protected Member Functions

virtual void dumpTrace ()

Protected Attributes

std::string description
 Stores the exception's description as a string.
std::string __cls_name

Private Attributes

OSErrorCodeT os_errno
 Stores the current OS error code value.

Friends

std::ostream & operator<< (std::ostream &stream, const Object &s)

Constructor & Destructor Documentation

xvr2::SystemException::SystemException (  ) 

Default constructor, try not to use it.

Warning:
Basically this contructor tries to read the latest error code returned by the host OS error reporting mechanism, the reason why it is not wise to use this constructor is basically because in a multi-threaded application each thread holds its own OS error code variable, so if this exception is to be crossed between threads you'll end up reporting the latest error code on the receiving thread using its value there, which of course, is not the same you'll be reporting from the failed thread.

xvr2::SystemException::SystemException ( OSErrorCodeT  error_code  ) 

This constructor properly initializes the exception based on the error code you report after reading the last OS reported error code.

Parameters:
error_code OS last return error code, in UNIX platforms this should be the value of the errno global variable.

xvr2::SystemException::SystemException ( const SystemException se  ) 

Copy contructor takes care of properly initlializing all internal variables by copying their values from the given source exception object.

Parameters:
se The source exception object from where we'll be instatiating.


Member Function Documentation

OSErrorCodeT xvr2::SystemException::osErrorCode (  ) 

Returns the error code's value at the time the exception was thrown.

String xvr2::SystemException::osErrorMessage (  ) 

Returns an String describing a textual representation of the error condition thrown.

int xvr2::SystemException::code (  ) 

Deprecated method, please don't use.

Deprecated:
This method will be removed in X-VR2 version 0.8.3

virtual String xvr2::SystemException::message (  )  [virtual]

Deprecated method, please don't use.

Deprecated:
This method will be removed in X-VR2 version 0.8.3

std::string xvr2::Exception::toString (  )  [virtual, inherited]

Displays the description of the exception.

Reimplemented from xvr2::Object.

virtual void xvr2::ExceptionTracer::dumpTrace (  )  [protected, virtual, inherited]

static void xvr2::ExceptionTracer::enable (  )  [static, inherited]

static void xvr2::ExceptionTracer::disable (  )  [static, inherited]

const char* xvr2::ExceptionTracer::backtrace (  )  [inherited]

virtual const char* xvr2::Object::getClassName (  )  [virtual, inherited]

Returns the name of the current class.

static void xvr2::Object::debugmsg ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

Will print a debug message to the screen.

static void xvr2::Object::debugmsgln ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const Object s 
) [friend, inherited]


Member Data Documentation

Stores the current OS error code value.

Definition at line 27 of file SystemException.h.

std::string xvr2::Exception::description [protected, inherited]

Stores the exception's description as a string.

Definition at line 29 of file CoreExceptions.h.

std::string xvr2::Object::__cls_name [protected, inherited]

Definition at line 30 of file Object.h.


The documentation for this class was generated from the following file:

Generated on Fri Jun 20 22:55:57 2008 for X-VR2 SDK by  doxygen 1.5.5