errormacro.hh File Reference
#include <iostream>
#include <sstream>
#include <cassert>
#include <stdexcept>
#include <mia/core/defines.hh>
Include dependency graph for errormacro.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG_ASSERT_RELEASE_THROW(cond, msg...)
 

Functions

template<typename V >
void __append_message (std::ostream &os, const V &v)
 
void __append_message (std::ostream &os)
 
template<typename V , typename... T>
void __append_message (std::ostream &os, const V &v, T ...t)
 
template<typename... T>
const std::string __create_message (T ...t)
 
template<typename E , typename... T>
create_exception (T ...t)
 helper template to create exceptions with complex messages More...
 

Macro Definition Documentation

◆ DEBUG_ASSERT_RELEASE_THROW

#define DEBUG_ASSERT_RELEASE_THROW (   cond,
  msg... 
)
Value:
if (!(cond)) { \
std::cerr << "Assertion failed: \'" #cond << "\' " << \
__FILE__ << ":" << __LINE__ << " " \
<< ::mia::__create_message(msg) << "\n"; \
abort(); \
}
const std::string __create_message(T ...t)
Definition: errormacro.hh:56

Definition at line 99 of file errormacro.hh.

Referenced by TCArrayWrapper< T >::begin(), TCArrayWrapper< T >::end(), TCArrayWrapper< T >::operator[](), and T2DVector< T2DVector< T > >::operator[]().

Function Documentation

◆ __append_message() [1/3]

template<typename V >
void __append_message ( std::ostream &  os,
const V &  v 
)

Definition at line 39 of file errormacro.hh.

Referenced by __append_message(), and __create_message().

◆ __append_message() [2/3]

void __append_message ( std::ostream &  os)
inline

Definition at line 44 of file errormacro.hh.

◆ __append_message() [3/3]

template<typename V , typename... T>
void __append_message ( std::ostream &  os,
const V &  v,
T ...  t 
)

Definition at line 49 of file errormacro.hh.

References __append_message().

◆ __create_message()

template<typename... T>
const std::string __create_message ( T ...  t)

Definition at line 56 of file errormacro.hh.

References __append_message().

Referenced by create_exception().