Compute Graph Framework SDK Reference
5.4.5418 Release
For Test and Development only

dw::framework::Exception Class Reference

Detailed Description

Definition at line 53 of file Exception.hpp.

Inheritance diagram for dw::framework::Exception:

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)
 Same as previous guard but with a simpler tryBlock with signature 'void tryBlock()' Always returns DW_SUCCESS unless an exception is thrown. More...
 
template<typename TryBlock >
static dwStatus guardWithNoPrint (TryBlock tryBlock)
 
template<typename TryBlock >
static dwStatus guardWithReturn (TryBlock tryBlock)
 Simple try/catch handler to catch dw::core::Exception and return a dwStatus error code if the given function block throws. More...
 

Static Public Attributes

static constexpr char8_t LOG_TAG [] = "Exception"
 

Constructor & Destructor Documentation

◆ Exception() [1/2]

dw::framework::Exception::Exception ( dwStatus  statusCode,
const char8_t *  messageStr 
)
inline

Definition at line 58 of file Exception.hpp.

References messageStr(), and ~Exception().

◆ ~Exception()

dw::framework::Exception::~Exception ( )
overridedefaultnoexcept

Referenced by Exception().

◆ Exception() [2/2]

template<class... Tothers>
dw::framework::Exception::Exception ( dwStatus  statusCode,
const char8_t *  messageStr,
Tothers...  others 
)
inlineexplicit

Definition at line 73 of file Exception.hpp.

Member Function Documentation

◆ guard()

template<typename TryBlock >
dwStatus dw::framework::Exception::guard ( TryBlock  tryBlock)
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(), messageStr(), and dw::framework::PassImpl< PassFunctionT >::run().

◆ guardWithNoPrint()

template<typename TryBlock >
dwStatus dw::framework::Exception::guardWithNoPrint ( TryBlock  tryBlock)
static

◆ guardWithReturn()

template<typename TryBlock >
dwStatus dw::framework::Exception::guardWithReturn ( TryBlock  tryBlock)
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, stored in m_lastException 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::getHealthSignals(), dw::framework::ExceptionSafeSensorNode::getHealthSignals(), dw::framework::ExceptionSafeProcessNode::getName(), dw::framework::ExceptionSafeSensorNode::getName(), dw::framework::ExceptionSafeProcessNode::getPasses(), dw::framework::ExceptionSafeSensorNode::getPasses(), guard(), dw::framework::ExceptionSafeSensorNode::isVirtual(), messageStr(), 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::ExceptionSafeSensorNode::setThreadPriority(), dw::framework::ExceptionSafeSensorNode::start(), dw::framework::ExceptionSafeSensorNode::stop(), dw::framework::ExceptionSafeProcessNode::validate(), and dw::framework::ExceptionSafeSensorNode::validate().

◆ messageStr()

char8_t const* dw::framework::Exception::messageStr ( ) const
inlinenoexcept

◆ status()

dwStatus dw::framework::Exception::status ( ) const
inline

Field Documentation

◆ LOG_TAG

constexpr char8_t dw::framework::Exception::LOG_TAG[] = "Exception"
static

Definition at line 56 of file Exception.hpp.


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