MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / throw_exception_v4

Function throw_exception_v4

benchmarks/tbb/tbb_misc.cpp:119–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void throw_exception_v4 ( exception_id eid ) {
120 __TBB_ASSERT ( eid > 0 && eid < eid_max, "Unknown exception ID" );
121 switch ( eid ) {
122 case eid_bad_alloc: DO_THROW( bad_alloc, () );
123 case eid_bad_last_alloc: DO_THROW( bad_last_alloc, () );
124 case eid_nonpositive_step: DO_THROW( invalid_argument, ("Step must be positive") );
125 case eid_out_of_range: DO_THROW( out_of_range, ("Index out of requested size range") );
126 case eid_segment_range_error: DO_THROW( range_error, ("Index out of allocated segment slots") );
127 case eid_index_range_error: DO_THROW( range_error, ("Index is not allocated") );
128 case eid_missing_wait: DO_THROW( missing_wait, () );
129 case eid_invalid_multiple_scheduling: DO_THROW( invalid_multiple_scheduling, () );
130 case eid_improper_lock: DO_THROW( improper_lock, () );
131 case eid_possible_deadlock: DO_THROW( runtime_error, ("Resource deadlock would occur") );
132 case eid_operation_not_permitted: DO_THROW( runtime_error, ("Operation not permitted") );
133 case eid_condvar_wait_failed: DO_THROW( runtime_error, ("Wait on condition variable failed") );
134 case eid_invalid_load_factor: DO_THROW( out_of_range, ("Invalid hash load factor") );
135 case eid_reserved: DO_THROW( out_of_range, ("[backward compatibility] Invalid number of buckets") );
136 case eid_invalid_swap: DO_THROW( invalid_argument, ("swap() is invalid on non-equal allocators") );
137 case eid_reservation_length_error: DO_THROW( length_error, ("reservation size exceeds permitted max size") );
138 case eid_invalid_key: DO_THROW( out_of_range, ("invalid key") );
139 case eid_user_abort: DO_THROW( user_abort, () );
140 case eid_bad_tagged_msg_cast: DO_THROW( runtime_error, ("Illegal tagged_msg cast") );
141#if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE
142 case eid_blocking_sch_init: DO_THROW( runtime_error, ("Nesting of blocking termination is impossible") );
143#endif
144 default: break;
145 }
146#if !TBB_USE_EXCEPTIONS && __APPLE__
147 out_of_range e1("");
148 length_error e2("");
149 range_error e3("");
150 invalid_argument e4("");
151#endif /* !TBB_USE_EXCEPTIONS && __APPLE__ */
152}
153
154#if _XBOX || __TBB_WIN8UI_SUPPORT
155bool GetBoolEnvironmentVariable( const char * ) { return false;}

Callers 2

throw_exceptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected