class NRPException¶
Overview¶
Base NRPException class. More…
#include <nrp_exceptions.h> class NRPException: public exception { public: // construction template <class T> NRPException(T&& msg, bool msgLogged = false); // methods 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 ); static void logCreate( const std::string& msg, NRPLogger::spdlog_out_fcn_t spdlogCall ); const char* what() const; }; // direct descendants class NRPExceptionNonRecoverable; class NRPExceptionRecoverable;
Detailed Documentation¶
Base NRPException class.
Methods¶
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.
Parameters:
EXCEPTION |
Exception type to return |
msg |
Message to log and put into thrown exception |
spdlogCall |
spdlog function to call for logging |