blocxx
Classes | Namespaces | Macros
Assertion.hpp File Reference
#include "blocxx/BLOCXX_config.h"
#include "blocxx/Exception.hpp"

Go to the source code of this file.

Classes

class  BLOCXX_NAMESPACE::AssertionException
 

Namespaces

namespace  BLOCXX_NAMESPACE
 Taken from RFC 1321.
 

Macros

#define BLOCXX_ASSERT(CON)
 BLOCXX_ASSERT works similar to the assert() macro, but instead of calling abort(), it throws an AssertionException.
 
#define BLOCXX_ASSERTMSG(CON, MSG)
 BLOCXX_ASSERTMSG works the same as BLOCXX_ASSERT, but with a second string parameter that will be added to the exception message on failure.
 

Macro Definition Documentation

◆ BLOCXX_ASSERT

#define BLOCXX_ASSERT (   CON)

BLOCXX_ASSERT works similar to the assert() macro, but instead of calling abort(), it throws an AssertionException.

Parameters
CONThe condition which will be evaluated.

Definition at line 57 of file Assertion.hpp.

◆ BLOCXX_ASSERTMSG

#define BLOCXX_ASSERTMSG (   CON,
  MSG 
)

BLOCXX_ASSERTMSG works the same as BLOCXX_ASSERT, but with a second string parameter that will be added to the exception message on failure.

Parameters
CONThe condition which will be evaluated.
MSGThe extra message. A C string literal.

Definition at line 71 of file Assertion.hpp.