#include "OBT_Exception.h"
#include "OBTTrace.h"
Go to the source code of this file.
Defines | |
#define | OBT_ASSERT(assertion) |
#define | OBT_DBG_ASSERT(assertion) OBT_ASSERT( assertion ) |
#define | STATIC_CHECK(expr, msg) typedef char ERROR_##msg[1][( expr )] |
#define OBT_ASSERT | ( | assertion | ) |
Value:
if ( !( assertion ) ) \ { \ std::string assertionMessage( "OBT Assertion Failed : " ) ; \ assertionMessage += #assertion ; \ TRACE_CRITICAL( assertionMessage.c_str() ) ; \ throw OBT::OBT_Exception( assertionMessage.c_str() ) ; \ }
Before throwing an exception, OBT_ASSERT traces a message labelled with the string representation of the expression which caused the assertion to fail.
Definition at line 15 of file OBT_ASSERT.h.
Referenced by OBT::Plugin::Plugin().
#define OBT_DBG_ASSERT | ( | assertion | ) | OBT_ASSERT( assertion ) |
throws an exception in debug mode if the tested assertion failed.
Before throwing an exception, DBG_OBT_ASSERT traces a critical message labelled with the string representation of the expression which caused the assertion to fail.
Definition at line 33 of file OBT_ASSERT.h.
Referenced by OBT::addService(), OBT::AbstractAttribute::initRTTI(), OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >::PrimitiveAttribute(), OBT::RTTI::RTTI(), OBT::TypedAttribute< TOwner, TAttribute >::setValue(), OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >::setValue(), and OBT::TypedAttribute< TOwner, TAttribute >::TypedAttribute().
#define STATIC_CHECK | ( | expr, | |||
msg | ) | typedef char ERROR_##msg[1][( expr )] |
Definition at line 39 of file OBT_ASSERT.h.