From 88304ce16a97945d13510b5fdaefcc0f62462d9d Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 19 Mar 2009 22:32:30 +0000 Subject: [PATCH] Error out when hierarchical block inputs and outputs aren't wired internally. Fixes ticket:237 git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10655 221aa14e-8319-0410-a670-987f0aec2ac5 --- .../src/lib/runtime/gr_hier_block2_detail.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc index a026851d..e5336d48 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc @@ -267,6 +267,12 @@ gr_hier_block2_detail::resolve_port(int port, bool is_input) throw std::runtime_error(msg.str()); } + if (d_inputs[port] == gr_endpoint()) { + msg << "hierarchical block '" << d_owner->name() << "' input " << port + << " is not connected internally"; + throw std::runtime_error(msg.str()); + } + result = resolve_endpoint(d_inputs[port], true); } else { @@ -275,6 +281,12 @@ gr_hier_block2_detail::resolve_port(int port, bool is_input) throw std::runtime_error(msg.str()); } + if (d_outputs[port] == gr_endpoint()) { + msg << "hierarchical block '" << d_owner->name() << "' output " << port + << " is not connected internally"; + throw std::runtime_error(msg.str()); + } + result = resolve_endpoint(d_outputs[port], false); } -- 2.47.2