|
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) |
| #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) | |
| #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__ )\ + ")." )
Use this macro to indicate where must not be reached.
1.5.5