summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime
diff options
context:
space:
mode:
authorJulien Olivain2011-12-13 14:05:55 -0800
committerJohnathan Corgan2011-12-13 14:15:17 -0800
commit543f8390edcab0201a68fabe86803b0d6f63ee34 (patch)
treef06b6524d278c1e8913bfff25183573e10b6d794 /gnuradio-core/src/lib/runtime
parent0ee2298b82a20ab13da022e1991be13f5272d581 (diff)
downloadgnuradio-543f8390edcab0201a68fabe86803b0d6f63ee34.tar.gz
gnuradio-543f8390edcab0201a68fabe86803b0d6f63ee34.tar.bz2
gnuradio-543f8390edcab0201a68fabe86803b0d6f63ee34.zip
runtime: improve hier_block2 error messages
Diffstat (limited to 'gnuradio-core/src/lib/runtime')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc17
1 files changed, 10 insertions, 7 deletions
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 877e240c2..1d0c66fb8 100644
--- a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
+++ b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
@@ -318,13 +318,14 @@ gr_hier_block2_detail::resolve_port(int port, bool is_input)
if (is_input) {
if (port < 0 || port >= (signed)d_inputs.size()) {
- msg << "resolve_port: input " << port << " is out of range";
+ msg << "resolve_port: hierarchical block '" << d_owner->name()
+ << "': input " << port << " is out of range";
throw std::runtime_error(msg.str());
}
if (d_inputs[port].empty()) {
- msg << "hierarchical block '" << d_owner->name() << "' input " << port
- << " is not connected internally";
+ msg << "resolve_port: hierarchical block '" << d_owner->name()
+ << "': input " << port << " is not connected internally";
throw std::runtime_error(msg.str());
}
@@ -337,13 +338,14 @@ gr_hier_block2_detail::resolve_port(int port, bool is_input)
}
else {
if (port < 0 || port >= (signed)d_outputs.size()) {
- msg << "resolve_port: output " << port << " is out of range";
+ msg << "resolve_port: hierarchical block '" << d_owner->name()
+ << "': output " << port << " is out of range";
throw std::runtime_error(msg.str());
}
if (d_outputs[port] == gr_endpoint()) {
- msg << "hierarchical block '" << d_owner->name() << "' output " << port
- << " is not connected internally";
+ msg << "resolve_port: hierarchical block '" << d_owner->name()
+ << "': output " << port << " is not connected internally";
throw std::runtime_error(msg.str());
}
@@ -351,7 +353,8 @@ gr_hier_block2_detail::resolve_port(int port, bool is_input)
}
if (result.empty()) {
- msg << "unable to resolve "
+ msg << "resolve_port: hierarchical block '" << d_owner->name()
+ << "': unable to resolve "
<< (is_input ? "input port " : "output port ")
<< port;
throw std::runtime_error(msg.str());