summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/terminate_handler.h
Commit message (Collapse)AuthorAgeFilesLines
* runtime: lib: Fix GR_RUNTIME_API declaration in terminate_handler.h.Ryan Volz2021-01-091-1/+1
| | | | Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: Add terminate handlingPaul Wicks2020-12-191-0/+19
This consists of the following changes: 1. Add a top_block parameter to control exception handling This restores past behavior where the scheduler catches exceptions raised in block threads, allowing flowgraphs to continue running after the failure of an individual block. It also adds optional new behavior, selected by setting catch_exceptions=False to the top block, which causes exceptions to not be caught. In this mode of operation, a std::terminate handler can be installed to print a stack trace before the flowgraph exits. 2. Add terminate_handler to top_block_impl This adds a terminate_handler function that prints information about any uncaught exceptions and also attempts to print a backtrace for said exception after which it calls std::abort. The backtrace is printed via libunwind, which is a new optional dependency. If libunwind is not found/installed, then the terminate handler will still print information about the exception and then exit. Co-Authored-By: Scott Torborg <storborg@gmail.com>