summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-09-27 14:55:31 +0000
committerfche <fche>2005-09-27 14:55:31 +0000
commitdc5118620812b9d9af8a2672e6a06a967fcded42 (patch)
tree1f1780304a37f8e5e6385d7b7c3e1d634fd62097 /tapsets.cxx
parentab4ff75bd82c8176a95e5c5165ecd9de03e25fcf (diff)
downloadsystemtap-steved-dc5118620812b9d9af8a2672e6a06a967fcded42.tar.gz
systemtap-steved-dc5118620812b9d9af8a2672e6a06a967fcded42.tar.xz
systemtap-steved-dc5118620812b9d9af8a2672e6a06a967fcded42.zip
2005-09-27 Frank Ch. Eigler <fche@elastic.org>
PR 1311. * tapsets.cxx (target_variable_flavour_calculating_visitor:: visit_target_symbol): Print verbose error. (var_expanding_copy_visitor::visit_target_symbol): Throw simple error.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 320be8c8..d3194d8f 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1500,8 +1500,9 @@ target_variable_flavour_calculating_visitor::visit_target_symbol (target_symbol
if (is_active_lvalue(e))
{
- throw semantic_error("read-only special variable "
- + e->base_name + " used as lvalue", e->tok);
+ q.sess.print_error (semantic_error("read-only special variable "
+ + e->base_name + " used as lvalue",
+ e->tok));
}
try
@@ -1536,7 +1537,7 @@ target_variable_flavour_calculating_visitor::visit_target_symbol (target_symbol
{
semantic_error er2 (er);
er2.tok1 = e->tok;
- throw er2;
+ q.sess.print_error (er2);
}
}
@@ -2062,8 +2063,9 @@ var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
if (is_active_lvalue(e))
{
- throw semantic_error("read-only special variable "
- + e->base_name + " used as lvalue", e->tok);
+ // No need to be verbose: the flavour-gathering visitor
+ // already printed a message for this exact case.
+ throw semantic_error ("due to failed target variable resolution");
}
string fname = "get_" + e->base_name.substr(1) + "_" + lex_cast<string>(tick++);
@@ -2082,9 +2084,9 @@ var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
}
catch (const semantic_error& er)
{
- semantic_error er2 (er);
- er2.tok1 = e->tok;
- throw er2;
+ // No need to be verbose: the flavour-gathering visitor
+ // already printed a message for this exact case.
+ throw semantic_error ("due to failed target variable resolution");
}
fdecl->name = fname;
fdecl->body = ec;