Definition at line 53 of file Exception.hpp.
Public Member Functions | |
Exception (dwStatus statusCode, const char8_t *messageStr) | |
template<class... Tothers> | |
Exception (dwStatus statusCode, const char8_t *messageStr, Tothers... others) | |
char8_t const * | messageStr () const noexcept |
dwStatus | status () const |
~Exception () noexcept override=default | |
Static Public Member Functions | |
template<typename TryBlock > | |
static dwStatus | guard (TryBlock tryBlock, dw::core::Logger::Verbosity verbosity=dw::core::Logger::Verbosity::DEBUG) |
template<typename TryBlock > | |
static dwStatus | guardWithNoPrint (TryBlock tryBlock) |
template<typename TryBlock > | |
static dwStatus | guardWithReturn (TryBlock tryBlock, dw::core::Logger::Verbosity verbosity=dw::core::Logger::Verbosity::DEBUG) |
Static Public Attributes | |
static constexpr char8_t | LOG_TAG [] = "Exception" |
|
inline |
Definition at line 58 of file Exception.hpp.
References messageStr().
|
overridedefaultnoexcept |
|
inlineexplicit |
Definition at line 73 of file Exception.hpp.
|
static |
Same as previous guard but with a simpler tryBlock with signature 'void tryBlock()' Always returns DW_SUCCESS unless an exception is thrown.
Definition at line 228 of file Exception.hpp.
References guardWithReturn().
Referenced by dw::framework::PortInput< T >::bindChannel(), dw::framework::PortOutput< T >::bindChannelWithReference(), and dw::framework::PassImpl< PassFunctionT >::run().
|
static |
Definition at line 242 of file Exception.hpp.
References status().
|
static |
Simple try/catch handler to catch dw::core::Exception and return a dwStatus error code if the given function block throws. Signature of tryBlock should be "dwStatus tryBlock()".
All errors should be reported through exceptions. If an exception is thrown it will be caught by the guard, a log message with the given severity and the exception message print and it's status code will be returned.
A template is used to allow inlining of the tryBlock.
Definition at line 122 of file Exception.hpp.
References status().
Referenced by dw::framework::ExceptionSafeProcessNode::getErrorSignal(), dw::framework::ExceptionSafeSensorNode::getErrorSignal(), dw::framework::ExceptionSafeProcessNode::getHealthSignal(), dw::framework::ExceptionSafeSensorNode::getHealthSignal(), dw::framework::ExceptionSafeProcessNode::getName(), dw::framework::ExceptionSafeSensorNode::getName(), dw::framework::ExceptionSafeProcessNode::getPasses(), dw::framework::ExceptionSafeSensorNode::getPasses(), guard(), dw::framework::ExceptionSafeSensorNode::isVirtual(), dw::framework::ExceptionSafeProcessNode::reportCurrentErrorSignal(), dw::framework::ExceptionSafeSensorNode::reportCurrentErrorSignal(), dw::framework::ExceptionSafeProcessNode::reportCurrentHealthSignal(), dw::framework::ExceptionSafeSensorNode::reportCurrentHealthSignal(), dw::framework::ExceptionSafeProcessNode::reset(), dw::framework::ExceptionSafeSensorNode::reset(), dw::framework::ExceptionSafeProcessNode::run(), dw::framework::ExceptionSafeSensorNode::run(), dw::framework::ExceptionSafeProcessNode::runPass(), dw::framework::ExceptionSafeSensorNode::runPass(), dw::framework::ExceptionSafeProcessNode::runPassByID(), dw::framework::ExceptionSafeSensorNode::runPassByID(), dw::framework::ExceptionSafeSensorNode::setAffinityMask(), dw::framework::ExceptionSafeSensorNode::setDataEventReadCallback(), dw::framework::ExceptionSafeSensorNode::setDataEventWriteCallback(), dw::framework::ExceptionSafeSensorNode::setEndTime(), dw::framework::ExceptionSafeProcessNode::setInputChannel(), dw::framework::ExceptionSafeSensorNode::setInputChannel(), dw::framework::ExceptionSafeProcessNode::setIterationCount(), dw::framework::ExceptionSafeSensorNode::setIterationCount(), dw::framework::ExceptionSafeProcessNode::setName(), dw::framework::ExceptionSafeSensorNode::setName(), dw::framework::ExceptionSafeProcessNode::setOutputChannel(), dw::framework::ExceptionSafeSensorNode::setOutputChannel(), dw::framework::ExceptionSafeSensorNode::setStartTime(), dw::framework::ExceptionSafeProcessNode::setState(), dw::framework::ExceptionSafeSensorNode::setState(), dw::framework::ExceptionSafeSensorNode::setThreadPriority(), dw::framework::ExceptionSafeSensorNode::start(), dw::framework::ExceptionSafeSensorNode::stop(), dw::framework::ExceptionSafeProcessNode::validate(), and dw::framework::ExceptionSafeSensorNode::validate().
|
inlinenoexcept |
Definition at line 84 of file Exception.hpp.
Referenced by Exception(), dw::framework::ParameterProvider::get(), and dw::framework::ParameterProvider::getOptional().
|
inline |
Definition at line 79 of file Exception.hpp.
Referenced by dw::framework::ParameterProvider::get(), dw::framework::ParameterProvider::getOptional(), guardWithNoPrint(), and guardWithReturn().
|
staticconstexpr |
Definition at line 56 of file Exception.hpp.