21 #ifndef __TBB_exception_H 22 #define __TBB_exception_H 24 #include "tbb_stddef.h" 26 #if !TBB_USE_EXCEPTIONS && _MSC_VER 28 #pragma warning (push) 29 #pragma warning (disable: 4530) 36 #if !TBB_USE_EXCEPTIONS && _MSC_VER 45 const char* what()
const throw();
46 #if __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 54 const char* what()
const throw();
60 const char* what()
const throw();
66 const char* what()
const throw();
72 const char* what()
const throw();
77 void __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4();
84 eid_segment_range_error,
85 eid_index_range_error,
87 eid_invalid_multiple_scheduling,
89 eid_possible_deadlock,
90 eid_operation_not_permitted,
91 eid_condvar_wait_failed,
92 eid_invalid_load_factor,
95 eid_reservation_length_error,
99 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 102 eid_blocking_sch_init = eid_reserved1,
104 eid_bad_tagged_msg_cast,
114 void __TBB_EXPORTED_FUNC throw_exception_v4 ( exception_id );
117 inline void throw_exception ( exception_id eid ) { throw_exception_v4(eid); }
122 #if __TBB_TASK_GROUP_CONTEXT 123 #include "tbb_allocator.h" 154 void*
operator new ( size_t );
172 virtual void destroy ()
throw() = 0;
179 virtual void throw_self () = 0;
182 virtual const char* name()
const throw() = 0;
185 virtual const char* what()
const throw() = 0;
193 void operator delete (
void* p ) {
194 internal::deallocate_via_handler_v3(p);
209 set(src.my_exception_name, src.my_exception_info);
221 if (
this != &src ) {
223 set(src.my_exception_name, src.my_exception_info);
232 void __TBB_EXPORTED_METHOD destroy ()
throw();
238 const char* __TBB_EXPORTED_METHOD name()
const throw();
241 const char* __TBB_EXPORTED_METHOD what()
const throw();
243 void __TBB_EXPORTED_METHOD
set (
const char* name,
const char* info )
throw();
244 void __TBB_EXPORTED_METHOD clear ()
throw();
254 const char* my_exception_name;
255 const char* my_exception_info;
263 template<
typename ExceptionData>
270 : my_exception_data(data_)
273 #
if TBB_USE_EXCEPTIONS
274 typeid(self_type).name()
285 , my_exception_name(src.my_exception_name)
291 if (
this != &src ) {
293 my_exception_name = src.my_exception_name;
298 ExceptionData& data ()
throw() {
return my_exception_data; }
300 const ExceptionData& data ()
const throw() {
return my_exception_data; }
302 const char*
name ()
const throw() {
return my_exception_name; }
304 const char*
what ()
const throw() {
return "tbb::movable_exception"; }
317 __TBB_ASSERT ( my_dynamic,
"Method destroy can be called only on dynamically allocated movable_exceptions" );
320 internal::deallocate_via_handler_v3(
this);
336 const char* my_exception_name;
339 #if !TBB_USE_CAPTURED_EXCEPTION 345 class tbb_exception_ptr {
346 std::exception_ptr my_ptr;
349 static tbb_exception_ptr* allocate ();
350 static tbb_exception_ptr* allocate (
const tbb_exception& tag );
356 void destroy ()
throw();
359 void throw_self () { std::rethrow_exception(my_ptr); }
362 tbb_exception_ptr (
const std::exception_ptr& src ) : my_ptr(src) {}
364 #if __TBB_MAKE_EXCEPTION_PTR_PRESENT 365 my_ptr(std::make_exception_ptr(src))
367 my_ptr(std::copy_exception(src))
Exception for PPL locks.
Definition: tbb_exception.h:52
This class is used by TBB to propagate information about unhandled exceptions into the root thread...
Definition: tbb_exception.h:203
Interface to be implemented by all exceptions TBB recognizes and propagates across the threads...
Definition: tbb_exception.h:149
movable_exception * move()
Creates and returns pointer to the deep copy of this exception object.
Definition: tbb_exception.h:307
Exception for concurrent containers.
Definition: tbb_exception.h:43
Exception for repeated scheduling of the same task_handle.
Definition: tbb_exception.h:70
Template that can be used to implement exception that transfers arbitrary ExceptionData to the root t...
Definition: tbb_exception.h:264
const char * what() const
Returns the result of originally intercepted exception's what() method.
Definition: tbb_exception.h:304
const char * name() const
Returns RTTI name of the originally intercepted exception.
Definition: tbb_exception.h:302
*/
Definition: material.h:665
Definition: _flow_graph_async_msg_impl.h:32
void throw_self()
Throws this exception object.
Definition: tbb_exception.h:235
Exception for user-initiated abort.
Definition: tbb_exception.h:58
The namespace tbb contains all components of the library.
Definition: parallel_for.h:44
void destroy()
Destroys objects created by the move() method.
Definition: tbb_exception.h:316
ExceptionData my_exception_data
User data.
Definition: tbb_exception.h:328
Exception for missing wait on structured_task_group.
Definition: tbb_exception.h:64
void throw_self()
Throws this exception object.
Definition: tbb_exception.h:324