diff options
author | Scott Torborg <storborg@gmail.com> | 2018-07-14 18:56:50 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-05 16:07:47 -0800 |
commit | b0a26eeb4d8a4e0233f30e7137ec4c13391ca2b1 (patch) | |
tree | 625ceabd8dbd7f5e5061309ce6e7a3fe543f1181 /gnuradio-runtime/lib/top_block_impl.h | |
parent | 0c579fba83d55e2ee4acc8362a1be2beae86ad56 (diff) |
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.
Diffstat (limited to 'gnuradio-runtime/lib/top_block_impl.h')
-rw-r--r-- | gnuradio-runtime/lib/top_block_impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/top_block_impl.h b/gnuradio-runtime/lib/top_block_impl.h index 84611b3f85..888b0fe0ab 100644 --- a/gnuradio-runtime/lib/top_block_impl.h +++ b/gnuradio-runtime/lib/top_block_impl.h @@ -39,7 +39,7 @@ namespace gr { class GR_RUNTIME_API top_block_impl { public: - top_block_impl(top_block* owner); + top_block_impl(top_block* owner, bool catch_exceptions); ~top_block_impl(); // Create and start scheduler threads @@ -85,6 +85,7 @@ protected: bool d_retry_wait; boost::condition_variable d_lock_cond; int d_max_noutput_items; + bool d_catch_exceptions; private: void restart(); |