qpmad
Eigen-based C++ QP solver.
Loading...
Searching...
No Matches
Macros
cpput_exception.h File Reference

Detailed Description

Throw & assert macro.

Author
Alexander Sherikov

Definition in file cpput_exception.h.

Go to the source code of this file.

#include <string>
#include <stdexcept>

Macros

#define QPMAD_UTILS_THROW_EXCEPTION(exception_type, message)   throw exception_type((message))
 
#define QPMAD_UTILS_THROW(s)   QPMAD_UTILS_THROW_EXCEPTION(std::runtime_error, (s))
 
#define QPMAD_UTILS_PERSISTENT_ASSERT(condition, message)
 
#define QPMAD_UTILS_ASSERT(condition, message)   QPMAD_UTILS_PERSISTENT_ASSERT(condition, message)
 

Macro Definition Documentation

◆ QPMAD_UTILS_ASSERT

#define QPMAD_UTILS_ASSERT (   condition,
  message 
)    QPMAD_UTILS_PERSISTENT_ASSERT(condition, message)

Definition at line 40 of file cpput_exception.h.

◆ QPMAD_UTILS_PERSISTENT_ASSERT

#define QPMAD_UTILS_PERSISTENT_ASSERT (   condition,
  message 
)
Value:
if (!(condition)) \
{ \
QPMAD_UTILS_THROW(message); \
};

Definition at line 31 of file cpput_exception.h.

◆ QPMAD_UTILS_THROW

#define QPMAD_UTILS_THROW (   s)    QPMAD_UTILS_THROW_EXCEPTION(std::runtime_error, (s))

Definition at line 26 of file cpput_exception.h.

◆ QPMAD_UTILS_THROW_EXCEPTION

#define QPMAD_UTILS_THROW_EXCEPTION (   exception_type,
  message 
)    throw exception_type((message))

Definition at line 17 of file cpput_exception.h.