17 #ifndef __TBB_exception_H 18 #define __TBB_exception_H 31 #if __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 84 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 107 #if __TBB_TASK_GROUP_CONTEXT 139 void*
operator new ( size_t );
157 virtual void destroy()
throw() = 0;
167 virtual const char*
name()
const throw() = 0;
178 void operator delete (
void*
p ) {
206 if (
this != &src ) {
208 set(src.my_exception_name, src.my_exception_info);
243 template<
typename ExceptionData>
271 if (
this != &src ) {
295 __TBB_ASSERT (
my_dynamic,
"Method destroy can be called only on dynamically allocated movable_exceptions" );
316 #if !TBB_USE_CAPTURED_EXCEPTION 342 my_ptr(std::make_exception_ptr(src))
344 my_ptr(std::copy_exception(src))
tbb_exception_ptr(const std::exception_ptr &src)
virtual const char * name() const =0
Returns RTTI name of the originally intercepted exception.
The last enumerator tracks the number of defined IDs. It must remain the last one.
Exception container that preserves the exact copy of the original exception.
void __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4()
Obsolete.
#define __TBB_EXPORTED_METHOD
void throw_self() __TBB_override
Throws this exception object.
void destroy() __TBB_override
Destroys objects created by the move() method.
const char *__TBB_EXPORTED_METHOD what() const __TBB_override
Returns the result of originally intercepted exception's what() method.
static tbb_exception_ptr * allocate()
#define __TBB_EXPORTED_FUNC
void __TBB_EXPORTED_FUNC deallocate_via_handler_v3(void *p)
Deallocates memory using FreeHandler.
const char * what() const __TBB_override
void __TBB_EXPORTED_FUNC throw_exception_v4(exception_id)
Gathers all throw operators in one place.
std::exception_ptr my_ptr
movable_exception(const ExceptionData &data_)
virtual void throw_self()=0
Throws this exception object.
void *__TBB_EXPORTED_FUNC allocate_via_handler_v3(size_t n)
Allocates memory using MallocHandler.
__TBB_EXPORTED_METHOD ~captured_exception()
Exception for missing wait on structured_task_group.
tbb_exception_ptr(const captured_exception &src)
Exception for concurrent containers.
void __TBB_EXPORTED_METHOD destroy() __TBB_override
Destroys objects created by the move() method.
captured_exception *__TBB_EXPORTED_METHOD move() __TBB_override
Creates and returns pointer to the deep copy of this exception object.
const char * my_exception_name
RTTI name of this class.
const char * what() const __TBB_override
virtual const char * what() const __TBB_override=0
Returns the result of originally intercepted exception's what() method.
void __TBB_EXPORTED_METHOD set(const char *name, const char *info)
Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
#define __TBB_MAKE_EXCEPTION_PTR_PRESENT
const char * what() const __TBB_override
Returns the result of originally intercepted exception's what() method.
void throw_self()
Throws the contained exception .
const char * what() const __TBB_override
static captured_exception * allocate(const char *name, const char *info)
Functionally equivalent to {captured_exception e(name,info); return e.move();}.
const ExceptionData & data() const
virtual tbb_exception * move()=0
Creates and returns pointer to the deep copy of this exception object.
const movable_exception & operator=(const movable_exception &src)
movable_exception * move() __TBB_override
Creates and returns pointer to the deep copy of this exception object.
const char * name() const __TBB_override
Returns RTTI name of the originally intercepted exception.
captured_exception(const captured_exception &src)
captured_exception(const char *name_, const char *info)
Exception for user-initiated abort.
const char *__TBB_EXPORTED_METHOD name() const __TBB_override
Returns RTTI name of the originally intercepted exception.
const char * what() const __TBB_override
movable_exception(const movable_exception &src)
void destroy()
Destroys this objects.
#define TBB_USE_EXCEPTIONS
Template that can be used to implement exception that transfers arbitrary ExceptionData to the root t...
virtual void destroy()=0
Destroys objects created by the move() method.
const char * what() const __TBB_override
Exception for repeated scheduling of the same task_handle.
const char * my_exception_info
void __TBB_EXPORTED_METHOD clear()
void const char const char int ITT_FORMAT __itt_group_sync p
bool my_dynamic
Flag specifying whether this object has been dynamically allocated (by the move method)
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()
void throw_self() __TBB_override
Throws this exception object.
movable_exception< ExceptionData > self_type
This class is used by TBB to propagate information about unhandled exceptions into the root thread.
const char * my_exception_name
ExceptionData my_exception_data
User data.