oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

set_assertion_handler

Open flg opened this issue 2 years ago • 5 comments

tbb::set_assertion_handler was removed as from release 2021.1. Is there any other way to set an assertion handler?

tbb/detail/_assert.h still contains:

//! Process an assertion failure.
/** Normally called from __TBB_ASSERT macro.
  If assertion handler is null, print message for assertion failure and abort.
  Otherwise call the assertion handler. */
TBB_EXPORT void __TBB_EXPORTED_FUNC assertion_failure(const char* location, int line, const char* expression, const char* comment);

flg avatar Nov 14 '23 11:11 flg

Hi @flg, oneTBB doesn't have anything similar. Could you please describe your use case? Why do you need such API?

pavelkumbrasev avatar Nov 14 '23 11:11 pavelkumbrasev

Hi Pavel, Thanks for replying. The use case is simple: we would like to publish the assertion message to our own logging system before aborting.

flg avatar Nov 14 '23 12:11 flg

Thank you for the clarification. I will discuss the removal of this API within a team.

pavelkumbrasev avatar Nov 15 '23 10:11 pavelkumbrasev

@flg is this issue still relevant?

nofuturre avatar Jul 12 '24 15:07 nofuturre

Hi, I don't think this feature has been re-added so yes it is still relevant. I may missed it though; @pavelkumbrasev could maybe better comment on this.

flg avatar Jul 15 '24 06:07 flg