GraphLibrary  0.0.1
A simple library that implements various graph algorithms.
 All Classes Namespaces Files Functions Variables Typedefs Macros
gl_assert.hpp File Reference
#include <stdexcept>
#include <string>

Go to the source code of this file.

Macros

#define GL_ASSERT(EXPR, ERROR_MSG)
 Custom assert that supports attaching a message. More...
 

Macro Definition Documentation

#define GL_ASSERT (   EXPR,
  ERROR_MSG 
)
Value:
if (!(EXPR)) { \
std::string errorMessage (ERROR_MSG); \
throw std::runtime_error(errorMessage); \
}

Custom assert that supports attaching a message.

Parameters
EXPRIf this evaluates to false, the assertion is triggered.
ERROR_MSGString that will contain info on the error.