NRP Core  1.4.1
NRPException Class Reference

Base NRPException class. More...

#include <nrp_exceptions.h>

Inheritance diagram for NRPException:
NRPExceptionNonRecoverable NRPExceptionRecoverable

Public Member Functions

template<class T >
 NRPException (T &&msg, bool msgLogged=false)
 
 ~NRPException () override
 
const char * what () const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW override
 

Static Public Member Functions

template<class EXCEPTION >
static void logOnce (EXCEPTION &exception, NRPLogger::spdlog_out_fcn_t spdlogCall=NRPLogger::critical)
 
template<class EXCEPTION = NRPExceptionNonRecoverable, class LOG_EXCEPTION_T >
static EXCEPTION logCreate (LOG_EXCEPTION_T &exception, const std::string &msg, NRPLogger::spdlog_out_fcn_t spdlogCall=NRPLogger::critical)
 
template<class EXCEPTION = NRPExceptionNonRecoverable>
static EXCEPTION logCreate (const std::string &msg, NRPLogger::spdlog_out_fcn_t spdlogCall=NRPLogger::critical)
 Logs the given message to the output, then returns EXCEPTION type. More...
 
template<>
void logCreate (const std::string &msg, NRPLogger::spdlog_out_fcn_t spdlogCall)
 
template<>
void logCreate (const std::string &msg, NRPLogger::spdlog_out_fcn_t spdlogCall)
 

Protected Attributes

std::string _errMsg = ""
 

Detailed Description

Base NRPException class.

Constructor & Destructor Documentation

◆ NRPException()

template<class T >
NRPException::NRPException ( T &&  msg,
bool  msgLogged = false 
)
inlineexplicit

◆ ~NRPException()

NRPException::~NRPException ( )
overridedefault

Member Function Documentation

◆ logCreate() [1/4]

template<>
void NRPException::logCreate ( const std::string &  msg,
NRPLogger::spdlog_out_fcn_t  spdlogCall 
)
static

◆ logCreate() [2/4]

template<>
void NRPException::logCreate ( const std::string &  msg,
NRPLogger::spdlog_out_fcn_t  spdlogCall 
)
static

◆ logCreate() [3/4]

template<class EXCEPTION = NRPExceptionNonRecoverable>
static EXCEPTION NRPException::logCreate ( const std::string &  msg,
NRPLogger::spdlog_out_fcn_t  spdlogCall = NRPLogger::critical 
)
inlinestatic

Logs the given message to the output, then returns EXCEPTION type.

Template Parameters
EXCEPTIONException type to return
Parameters
msgMessage to log and put into thrown exception
spdlogCallspdlog function to call for logging

◆ logCreate() [4/4]

template<class EXCEPTION = NRPExceptionNonRecoverable, class LOG_EXCEPTION_T >
static EXCEPTION NRPException::logCreate ( LOG_EXCEPTION_T &  exception,
const std::string &  msg,
NRPLogger::spdlog_out_fcn_t  spdlogCall = NRPLogger::critical 
)
inlinestatic

◆ logOnce()

template<class EXCEPTION >
static void NRPException::logOnce ( EXCEPTION &  exception,
NRPLogger::spdlog_out_fcn_t  spdlogCall = NRPLogger::critical 
)
inlinestatic

◆ what()

const char * NRPException::what ( ) const
override

Member Data Documentation

◆ _errMsg

std::string NRPException::_errMsg = ""
protected

The documentation for this class was generated from the following files: