summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorjcorgan2008-02-05 16:54:24 +0000
committerjcorgan2008-02-05 16:54:24 +0000
commit00e5a82e769411988244fe6e3eb3fdbb30562169 (patch)
tree8dcb111230ccc02a3d21b6a03b2da59f6540b587 /gnuradio-core
parent33e175e4c63a383298eee4d37d8bec588620a9b4 (diff)
downloadgnuradio-00e5a82e769411988244fe6e3eb3fdbb30562169.tar.gz
gnuradio-00e5a82e769411988244fe6e3eb3fdbb30562169.tar.bz2
gnuradio-00e5a82e769411988244fe6e3eb3fdbb30562169.zip
Fixes abort issue in gr.top_block exception handling, improve some exception messages.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7565 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_top_block.i4
-rw-r--r--gnuradio-core/src/lib/runtime/gr_top_block_impl.cc6
2 files changed, 5 insertions, 5 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.i b/gnuradio-core/src/lib/runtime/gr_top_block.i
index 4eb9db636..f48dea74e 100644
--- a/gnuradio-core/src/lib/runtime/gr_top_block.i
+++ b/gnuradio-core/src/lib/runtime/gr_top_block.i
@@ -40,12 +40,12 @@ private:
public:
~gr_top_block();
- void start();
+ void start() throw (std::runtime_error);
void stop();
void wait();
void run();
void lock();
- void unlock();
+ void unlock() throw (std::runtime_error);
bool is_running();
};
diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
index ffdcbdb7a..7a993a759 100644
--- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
+++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
@@ -77,7 +77,7 @@ gr_top_block_impl::gr_top_block_impl(gr_top_block *owner)
d_lock_count(0)
{
if (s_impl)
- throw std::logic_error("gr_top_block_impl: multiple simultaneous gr_top_block's");
+ throw std::logic_error("gr_top_block_impl: multiple simultaneous gr_top_blocks not allowed");
s_impl = this;
}
@@ -95,7 +95,7 @@ gr_top_block_impl::start()
std::cout << "start: entered " << this << std::endl;
if (d_running)
- throw std::runtime_error("already running");
+ throw std::runtime_error("top block already running or wait() not called after previous stop()");
// Create new flat flow graph by flattening hierarchy
d_ffg = d_owner->flatten();
@@ -203,7 +203,7 @@ gr_top_block_impl::restart()
std::cout << "restart: entered" << std::endl;
if (!d_running)
- throw std::runtime_error("not running");
+ throw std::runtime_error("top block is not running");
// Stop scheduler threads and wait for completion
stop();