The Exceptions
[The Libecs library]

Collaboration diagram for The Exceptions:
The exceptions. More...

Classes

class  libecs::Exception
 Base exception class. More...

Defines

#define THROW_EXCEPTION(CLASS, MESSAGE)   throw CLASS( __PRETTY_FUNCTION__, MESSAGE )
 A macro to throw an exception, with method name.
#define DEBUG_EXCEPTION(EXPRESSION, CLASS, MESSAGE)
#define DEFINE_EXCEPTION(CLASSNAME, BASECLASS)
 

For internal use only.


#define NEVER_GET_HERE
 This macro throws UnexpectedError exception with a method name.

Functions

 libecs::DEFINE_EXCEPTION (UnexpectedError, Exception)
 libecs::DEFINE_EXCEPTION (NotFound, Exception)
 libecs::DEFINE_EXCEPTION (CantOpen, Exception)
 libecs::DEFINE_EXCEPTION (NotImplemented, Exception)
 libecs::DEFINE_EXCEPTION (AssertionFailed, Exception)
 libecs::DEFINE_EXCEPTION (AlreadyExist, Exception)
 libecs::DEFINE_EXCEPTION (ValueError, Exception)
 libecs::DEFINE_EXCEPTION (TypeError, Exception)
 libecs::DEFINE_EXCEPTION (SimulationError, Exception)
 libecs::DEFINE_EXCEPTION (InitializationFailed, SimulationError)
 libecs::DEFINE_EXCEPTION (RangeError, SimulationError)
 libecs::DEFINE_EXCEPTION (PropertyException, Exception)
 libecs::DEFINE_EXCEPTION (NoSlot, PropertyException)
 libecs::DEFINE_EXCEPTION (AttributeError, PropertyException)
 libecs::DEFINE_EXCEPTION (BadID, Exception)
 libecs::DEFINE_EXCEPTION (BadSystemPath, BadID)
 libecs::DEFINE_EXCEPTION (InvalidEntityType, BadID)

Detailed Description

The exceptions.


Define Documentation

#define DEBUG_EXCEPTION ( EXPRESSION,
CLASS,
MESSAGE   ) 

Value:

if( ! ( EXPRESSION ) )\
{\
  THROW_EXCEPTION( CLASS, "[ " + String( STR( EXPRESSION )  ) + " ]\n\t"\
                   + MESSAGE );\
}

#define DEFINE_EXCEPTION ( CLASSNAME,
BASECLASS   ) 

Value:

class CLASSNAME : public BASECLASS\
{\
public:\
  CLASSNAME( StringCref method, StringCref message = "" )\
    :  BASECLASS( method, message ) {}\
  virtual ~CLASSNAME() throw() {}\
  virtual StringLiteral getClassName() const\
    { return #CLASSNAME ; }\
};\

For internal use only.

#define NEVER_GET_HERE

Value:

THROW_EXCEPTION( UnexpectedError, \
                       "never get here (" + String( __PRETTY_FUNCTION__ )\
                       + ")." )
This macro throws UnexpectedError exception with a method name.

Use this macro to indicate where must not be reached.


Generated on Fri Aug 31 18:44:08 2007 for E-CELL C++ libraries (libecs and libemc) 3.1.105 by  doxygen 1.5.3