RTC Toolkit  0.1.0-alpha
Classes | Namespaces | Macros | Functions
exceptions.hpp File Reference

Provides macros and utilities for exception handling. More...

#include <exception>
#include <string>
#include <vector>
#include <ostream>
#include <chrono>
#include <thread>
#include <type_traits>
#include <boost/stacktrace.hpp>
#include <boost/filesystem.hpp>
#include <boost/core/demangle.hpp>

Go to the source code of this file.

Classes

class  elt::error::CiiException
 Base class for the exceptions thrown by the client API. More...
 
class  elt::error::CiiBaseException
 Base class for the exceptions. More...
 
class  elt::error::CiiError
 Base class for errors. More...
 

Namespaces

 elt
 
 elt::error
 

Macros

#define CII_THROW(exceptionType_t, ...)
 Throw exception with information about the throw location. More...
 
#define CII_THROW_WITH_NESTED(exceptionType_t, nested_exception, ...)
 Throw exception with information about the throw location. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const elt::error::CiiException &e)
 

Detailed Description

Provides macros and utilities for exception handling.

Macro Definition Documentation

◆ CII_THROW

#define CII_THROW (   exceptionType_t,
  ... 
)
Value:
{ \
throw CreateExceptionObject<exceptionType_t>(0, __FILE__, __LINE__, __FUNCTION__, \
__VA_ARGS__); \
}

Throw exception with information about the throw location.

Parameters
exceptionType_ttype of the exception we want to throw
...arguments of the exception

◆ CII_THROW_WITH_NESTED

#define CII_THROW_WITH_NESTED (   exceptionType_t,
  nested_exception,
  ... 
)
Value:
{ \
exceptionType_t throwing_exception = CreateExceptionObject<exceptionType_t>( \
nested_exception, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__); \
std::throw_with_nested(throwing_exception); \
}

Throw exception with information about the throw location.

Parameters
exceptionType_ttype of the exception we want to throw
nested_exceptiontype of the exception we want to nest
...arguments of the exception

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const elt::error::CiiException e 
)