Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::captured_exception Class Reference

This class is used by TBB to propagate information about unhandled exceptions into the root thread. More...

#include <tbb_exception.h>

Inheritance diagram for tbb::captured_exception:
Collaboration diagram for tbb::captured_exception:

Public Member Functions

 captured_exception (const captured_exception &src)
 
 captured_exception (const char *name_, const char *info)
 
__TBB_EXPORTED_METHOD ~captured_exception () throw ()
 
captured_exceptionoperator= (const captured_exception &src)
 
captured_exception *__TBB_EXPORTED_METHOD move () __TBB_override throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
void __TBB_EXPORTED_METHOD destroy () __TBB_override throw ()
 Destroys objects created by the move() method. More...
 
void throw_self () __TBB_override
 Throws this exception object. More...
 
const char *__TBB_EXPORTED_METHOD name () const __TBB_override throw ()
 Returns RTTI name of the originally intercepted exception. More...
 
const char *__TBB_EXPORTED_METHOD what () const __TBB_override throw ()
 Returns the result of originally intercepted exception's what() method. More...
 
void __TBB_EXPORTED_METHOD set (const char *name, const char *info) throw ()
 
void __TBB_EXPORTED_METHOD clear () throw ()
 
- Public Member Functions inherited from tbb::tbb_exception
void operator delete (void *p)
 

Private Member Functions

 captured_exception ()
 Used only by method move(). More...
 

Static Private Member Functions

static captured_exceptionallocate (const char *name, const char *info)
 Functionally equivalent to {captured_exception e(name,info); return e.move();}. More...
 

Private Attributes

bool my_dynamic
 
const char * my_exception_name
 
const char * my_exception_info
 

Detailed Description

This class is used by TBB to propagate information about unhandled exceptions into the root thread.

Exception of this type is thrown by TBB in the root thread (thread that started a parallel algorithm ) if an unhandled exception was intercepted during the algorithm execution in one of the workers.

See also
tbb::tbb_exception

Definition at line 191 of file tbb_exception.h.

Constructor & Destructor Documentation

◆ captured_exception() [1/3]

tbb::captured_exception::captured_exception ( const captured_exception src)
inline

Definition at line 194 of file tbb_exception.h.

195  : tbb_exception(src), my_dynamic(false)
196  {
197  set(src.my_exception_name, src.my_exception_info);
198  }
void __TBB_EXPORTED_METHOD set(const char *name, const char *info)

References my_exception_info, and my_exception_name.

◆ captured_exception() [2/3]

tbb::captured_exception::captured_exception ( const char *  name_,
const char *  info 
)
inline

Definition at line 200 of file tbb_exception.h.

201  : my_dynamic(false)
202  {
203  set(name_, info);
204  }
void __TBB_EXPORTED_METHOD set(const char *name, const char *info)

◆ ~captured_exception()

__TBB_EXPORTED_METHOD tbb::captured_exception::~captured_exception ( )
throw (
)

◆ captured_exception() [3/3]

tbb::captured_exception::captured_exception ( )
inlineprivate

Used only by method move().

Definition at line 231 of file tbb_exception.h.

Member Function Documentation

◆ allocate()

static captured_exception* tbb::captured_exception::allocate ( const char *  name,
const char *  info 
)
staticprivate

Functionally equivalent to {captured_exception e(name,info); return e.move();}.

◆ clear()

void __TBB_EXPORTED_METHOD tbb::captured_exception::clear ( )
throw (
)

◆ destroy()

void __TBB_EXPORTED_METHOD tbb::captured_exception::destroy ( )
throw (
)
virtual

Destroys objects created by the move() method.

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

Implements tbb::tbb_exception.

◆ move()

captured_exception* __TBB_EXPORTED_METHOD tbb::captured_exception::move ( )
throw (
)
virtual

Creates and returns pointer to the deep copy of this exception object.

Move semantics is allowed.

Implements tbb::tbb_exception.

◆ name()

const char* __TBB_EXPORTED_METHOD tbb::captured_exception::name ( ) const
throw (
)
virtual

Returns RTTI name of the originally intercepted exception.

Implements tbb::tbb_exception.

◆ operator=()

captured_exception& tbb::captured_exception::operator= ( const captured_exception src)
inline

Definition at line 208 of file tbb_exception.h.

208  {
209  if ( this != &src ) {
210  clear();
211  set(src.my_exception_name, src.my_exception_info);
212  }
213  return *this;
214  }
void __TBB_EXPORTED_METHOD clear()
void __TBB_EXPORTED_METHOD set(const char *name, const char *info)

◆ set()

void __TBB_EXPORTED_METHOD tbb::captured_exception::set ( const char *  name,
const char *  info 
)
throw (
)

◆ throw_self()

void tbb::captured_exception::throw_self ( )
inlinevirtual

Throws this exception object.

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

Implements tbb::tbb_exception.

Definition at line 220 of file tbb_exception.h.

220 { __TBB_THROW(*this); }
#define __TBB_THROW(e)
Definition: tbb_stddef.h:285

References __TBB_THROW.

◆ what()

const char* __TBB_EXPORTED_METHOD tbb::captured_exception::what ( ) const
throw (
)
virtual

Returns the result of originally intercepted exception's what() method.

Implements tbb::tbb_exception.

Member Data Documentation

◆ my_dynamic

bool tbb::captured_exception::my_dynamic
private

Definition at line 236 of file tbb_exception.h.

◆ my_exception_info

const char* tbb::captured_exception::my_exception_info
private

Definition at line 238 of file tbb_exception.h.

Referenced by captured_exception().

◆ my_exception_name

const char* tbb::captured_exception::my_exception_name
private

Definition at line 237 of file tbb_exception.h.

Referenced by captured_exception().


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

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.