Exception that can be moved to another thread.
class tbb_exception;
#include "tbb/tbb_exception.h"
In a parallel environment, exceptions sometimes have to be propagated across threads. Class tbb_exception subclasses std::exception to add support for such propagation.
namespace tbb { class tbb_exception: public std::exception { virtual tbb_exception* move() = 0; virtual void destroy() throw() = 0; virtual void throw_self() = 0; virtual const char* name() throw() = 0; virtual const char* what() throw() = 0; }; }
Derived classes should define the abstract virtual methods as follows:
move() should create a pointer to a copy of the exception that can outlive the original. It may move the contents of the original.
destroy() should destroy a copy created by move().
throw_self() should throw *this.
name() typically returns the RTTI name of the originally intercepted exception.
what() returns a null-terminated string describing the exception.