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

Throw & assert macro. More...

#include <stdexcept>

Go to the source code of this file.

Macros

#define QPMAD_UTILS_THROW_EXCEPTION(exception_type, message)
#define QPMAD_UTILS_THROW(s)
#define QPMAD_UTILS_PERSISTENT_ASSERT(condition, ...)
#define QPMAD_UTILS_ASSERT(condition, ...)

Detailed Description

Throw & assert macro.

Author
Alexander Sherikov

Definition in file exception.h.

Macro Definition Documentation

◆ QPMAD_UTILS_ASSERT

#define QPMAD_UTILS_ASSERT ( condition,
... )
Value:
QPMAD_UTILS_PERSISTENT_ASSERT(condition, __VA_ARGS__)
#define QPMAD_UTILS_PERSISTENT_ASSERT(condition,...)
Definition exception.h:22

Definition at line 31 of file exception.h.

◆ QPMAD_UTILS_PERSISTENT_ASSERT

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

Definition at line 22 of file exception.h.

◆ QPMAD_UTILS_THROW

#define QPMAD_UTILS_THROW ( s)
Value:
QPMAD_UTILS_THROW_EXCEPTION(std::runtime_error, (std::string("In ") + __func__ + "() // " + (s)))
#define QPMAD_UTILS_THROW_EXCEPTION(exception_type, message)
Definition exception.h:16

Definition at line 18 of file exception.h.

◆ QPMAD_UTILS_THROW_EXCEPTION

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

Definition at line 16 of file exception.h.