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) |
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" |
|
inline |
Definition at line 58 of file Exception.hpp.
References messageStr(), and ~Exception().
|
overridedefaultnoexcept |
Referenced by Exception().
|
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(), messageStr(), and dw::framework::PassImpl< PassFunctionT >::run().
|
static |
Definition at line 241 of file Exception.hpp.
References dw::framework::nvSciGetErrorName(), dw::framework::nvSciGetEventName(), and status().
Referenced by messageStr().
|
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().
|
inlinenoexcept |
Definition at line 84 of file Exception.hpp.
References guard(), guardWithNoPrint(), and guardWithReturn().
Referenced by dw::framework::describeParameters(), Exception(), dw::framework::ParameterProvider::get(), and dw::framework::ParameterProvider::getOptional().
|
inline |
Definition at line 79 of file Exception.hpp.
Referenced by dw::framework::describeParameters(), dw::framework::ParameterProvider::get(), dw::framework::ParameterProvider::getOptional(), guardWithNoPrint(), and guardWithReturn().
|
static |
Definition at line 56 of file Exception.hpp.