#include "OBT_Exception.h"
#include "OBTTrace.h"
Go to the source code of this file.
Defines | |
#define | OBT_ASSERT(assertion) |
throws an exception if the tested assertion failed. | |
#define | OBT_DBG_ASSERT(assertion) OBT_ASSERT( assertion ) |
throws an exception in debug mode if the tested assertion failed. | |
#define | STATIC_CHECK(expr, msg) typedef char ERROR_##msg[1][( expr )] |
#define OBT_ASSERT | ( | assertion | ) |
if ( !( assertion ) ) \ { \ std::string assertionMessage( "OBT Assertion Failed : " ) ; \ assertionMessage += #assertion ; \ TRACE_CRITICAL( assertionMessage.c_str() ) ; \ throw OBT::OBT_Exception( assertionMessage.c_str() ) ; \ }
throws an exception if the tested assertion failed.
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::OptionLastArg::argMatch(), OBT::OptionArg::atLastArg(), OBT::OptionArgHandler::get(), OBT::OptionArg::getArg(), OBT::OptionArg::getNextArg(), OBT::OptionArg::moveNextArg(), OBT::OptionArg::OptionArg(), OBT::OptionArg::peekArg(), and 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.