cisst-saw
Loading...
Searching...
No Matches
cmnAssert.h File Reference

Assert macros definitions. More...

#include <cisstCommon/cmnPortability.h>
#include <cisstCommon/cmnThrow.h>
#include <assert.h>
#include <cstdlib>
#include <sstream>
#include <cisstCommon/cmnLogger.h>

Go to the source code of this file.

Macros

#define _cmnAssert_h
#define CMN_ASSERT_IS_DEFINED   1
#define CMN_ASSERT(expr)

Detailed Description

Assert macros definitions.

Macro Definition Documentation

◆ _cmnAssert_h

#define _cmnAssert_h

◆ CMN_ASSERT

#define CMN_ASSERT ( expr)
Value:
{ \
if (!(expr)) { \
std::stringstream messageBuffer; \
messageBuffer << __FILE__ << ": Assertion '" << #expr \
<< "' failed in: " << CMN_PRETTY_FUNCTION \
<< ", line #" << __LINE__; \
std::cerr << messageBuffer.str() << std::endl; \
CMN_LOG_INIT_ERROR << messageBuffer.str() << std::endl; \
abort(); \
} \
}
#define CMN_LOG_INIT_ERROR
Definition cmnLogger.h:162
#define CMN_PRETTY_FUNCTION
Definition cmnPortability.h:608