Skip to content

Add TANGO_ASSERT macro

Thomas Ives requested to merge 1041-assert-macro into main

In this MR I have added a macro TANGO_ASSERT which calls std::terminate if the assertion fails. I have added a small wrapper around std::terminate which first prints (to cerr) some information about the assertion failure. As the default implementation of std::terminate calls std::abort this should generate a core dump (on linux at least).

TODO:

  • Use tango logger when available instead (as well as?) cerr
  • Print/Log a backtrace?

Working towards #1041 (closed).

Edited by Thomas Ives

Merge request reports