HDK
|
#include <exception.h>
Public Member Functions | |
virtual TF_API | ~TfBaseException () |
TF_API | TfBaseException (std::string const &message) |
TfCallContext const & | GetThrowContext () const |
std::vector< uintptr_t > const & | GetThrowStack () const |
void | MoveThrowStackTo (std::vector< uintptr_t > &out) |
virtual TF_API const char * | what () const noexceptoverride |
Friends | |
template<class Derived , class... Args> | |
void | Tf_Throw (TfCallContext const &cc, TfSkipCallerFrames skipFrames, Args &&...args) |
The base class for exceptions supported by the Tf exceptions facilities. Typical usage is to publically derive your own exception class from this one, and throw using the TF_THROW() macro.
Deriving this base class and throwing via TF_THROW() will record the throw point's call context (see GetThrowContext()) and will also capture a portion of the throwing thread's call stack (see GetThrowStack()).
Additionally, the Tf library registers an exception translator with hboost.python to raise a Python exeption wrapping the thrown exception object. Similarly utilties that call Python via Tf will re-throw the embedded C++ exception if the Python exception unwinds back into C++.
Definition at line 63 of file exception.h.
|
virtual |
|
explicit |
Construct with message
, reported by this class's what() implementation.
|
inline |
Return the call context from the throw point associated with this exception. Note that this context may be invalid if this exception was not thrown with TF_THROW().
Definition at line 77 of file exception.h.
|
inline |
Return the stack frame pointers from the throw point. See ArchPrintStackFrames() to turn these into human-readable strings.
Definition at line 83 of file exception.h.
|
inline |
Move the stack frame pointers from the throw point to out
. See GetThrowStack() for more details.
Definition at line 89 of file exception.h.
|
overridevirtualnoexcept |
Override std::exception::what() to return the message passed during construction.
|
friend |
Definition at line 121 of file exception.h.