summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python
diff options
context:
space:
mode:
authorPaul Wicks <pwicks86@gmail.com>2018-07-10 13:38:27 -0700
committerMarcus Müller <marcus@hostalia.de>2020-12-19 12:59:25 +0100
commit6d6c9a254102374d3fdbc4c39eac0b67e07168b7 (patch)
tree62028d8c95483062382c334bb4cdb8ef98fa5967 /gnuradio-runtime/python
parenta5e49d9120e8d0d7adf4de792cc3c4bc1a6defbc (diff)
runtime: Add terminate handling
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>
Diffstat (limited to 'gnuradio-runtime/python')
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/top_block.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/top_block.py b/gnuradio-runtime/python/gnuradio/gr/top_block.py
index 1389e5968a..d44c6c46d4 100644
--- a/gnuradio-runtime/python/gnuradio/gr/top_block.py
+++ b/gnuradio-runtime/python/gnuradio/gr/top_block.py
@@ -88,7 +88,7 @@ class top_block(hier_block2):
Create a top block with a given name.
"""
# not calling hier_block2.__init__, we set our own _impl
- self._impl = top_block_pb(name)
+ self._impl = top_block_pb(name, catch_exceptions)
self.handle_sigint = True
def start(self, max_noutput_items=10000000):