rad 6.2.0
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
exceptions.hpp File Reference

Exception classes header file. More...

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

Go to the source code of this file.

Classes

class  rad::Exception
 Base class for the exceptions thrown by RAD and its users. More...
 

Namespaces

namespace  rad
 

Macros

#define RAD_THROW(exceptionType_t, msg)
 Throw exception with information about the throw location.
 
#define RAD_RETHROW(exceptionType_t, nested_exception, msg)
 Throw exception with information about the throw location.
 
#define RAD_LOG_THROW(exceptionType_t, logger, msg)
 Throw exception with information about the throw location.
 

Functions

std::ostream & rad::operator<< (std::ostream &os, const rad::Exception &e)
 

Detailed Description

Exception classes header file.

Author
landolfa

Macro Definition Documentation

◆ RAD_LOG_THROW

#define RAD_LOG_THROW ( exceptionType_t,
logger,
msg )
Value:
{ \
LOG4CPLUS_ERROR(logger, msg); \
throw rad::CreateExceptionObject<exceptionType_t>(0, __FILE__, __LINE__, __FUNCTION__, \
msg); \
}

Throw exception with information about the throw location.

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

◆ RAD_RETHROW

#define RAD_RETHROW ( exceptionType_t,
nested_exception,
msg )
Value:
{ \
exceptionType_t throwing_exception = rad::CreateExceptionObject<exceptionType_t>( \
nested_exception, __FILE__, __LINE__, __FUNCTION__, msg); \
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

◆ RAD_THROW

#define RAD_THROW ( exceptionType_t,
msg )
Value:
{ \
throw rad::CreateExceptionObject<exceptionType_t>(0, __FILE__, __LINE__, __FUNCTION__, \
msg); \
}

Throw exception with information about the throw location.

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