NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Exceptions::RuntimeException Class Reference

Exception to be used to report errors and stacktraces This is meant to be used for NES-related errors, wrap std exceptions with their own stacktrace, etc.. More...

#include <RuntimeException.hpp>

Collaboration diagram for NES::Exceptions::RuntimeException:
[legend]

Public Member Functions

 RuntimeException (std::string msg, std::string &&stacktrace=collectStacktrace(), const std::source_location location=std::source_location::current())
 
 RuntimeException (std::string msg, const std::string &stacktrace)
 
 ~RuntimeException () noexcept override=default
 
const char * what () const noexcept override
 

Protected Attributes

std::string errorMessage
 Error message. More...
 

Detailed Description

Exception to be used to report errors and stacktraces This is meant to be used for NES-related errors, wrap std exceptions with their own stacktrace, etc..

Constructor & Destructor Documentation

◆ RuntimeException() [1/2]

NES::Exceptions::RuntimeException::RuntimeException ( std::string  msg,
std::string &&  stacktrace = collectStacktrace(),
const std::source_location  location = std::source_location::current() 
)
explicit

Constructor

Parameters
msgThe error message
stacktraceError stacktrace

References errorMessage, NES::Logger::getInstance(), NES::getLogLevel(), NES::LOG_DEBUG, and NES_ERROR.

Here is the call graph for this function:

◆ RuntimeException() [2/2]

NES::Exceptions::RuntimeException::RuntimeException ( std::string  msg,
const std::string &  stacktrace 
)
explicit

Constructor

Parameters
msgThe error message
stacktraceError stacktrace

References errorMessage, NES::Logger::getInstance(), NES::getLogLevel(), and NES::LOG_DEBUG.

Here is the call graph for this function:

◆ ~RuntimeException()

NES::Exceptions::RuntimeException::~RuntimeException ( )
overridedefaultnoexcept

Destructor. Virtual to allow for subclassing.

Member Function Documentation

◆ what()

const char * NES::Exceptions::RuntimeException::what ( ) const
overridenoexcept

Returns a pointer to the (constant) error description.

Returns
A pointer to a const char*. The underlying memory is in possession of the Except object. Callers must not attempt to free the memory.

References errorMessage.

Referenced by NES::Monitoring::LinuxSystemResourcesReader::readCpuStats(), NES::Monitoring::LinuxSystemResourcesReader::readDiskStats(), NES::Monitoring::LinuxSystemResourcesReader::readMemoryStats(), NES::Monitoring::LinuxSystemResourcesReader::readNetworkStats(), NES::Monitoring::LinuxSystemResourcesReader::readRegistrationMetrics(), NES::Monitoring::LinuxSystemResourcesReader::readRuntimeNesMetrics(), NES::Runtime::ThreadPool::runningRoutine(), and NES::TEST_F().

Here is the caller graph for this function:

Member Data Documentation

◆ errorMessage

std::string NES::Exceptions::RuntimeException::errorMessage
protected

Error message.

Referenced by RuntimeException(), and what().


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