summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
authorCharley Wang <chwang@redhat.com>2010-03-23 11:55:56 -0400
committerCharley Wang <chwang@redhat.com>2010-03-23 11:55:56 -0400
commit72cdb9cd5afd6936a189b26a29eb8aa23d32a4fa (patch)
treed5618b33b628e2c641535f3067616759eaf6f9f8 /parse.cxx
parente36ba31aa58694a18e8012e946f7b1e4dea51fd7 (diff)
downloadsystemtap-steved-72cdb9cd5afd6936a189b26a29eb8aa23d32a4fa.tar.gz
systemtap-steved-72cdb9cd5afd6936a189b26a29eb8aa23d32a4fa.tar.xz
systemtap-steved-72cdb9cd5afd6936a189b26a29eb8aa23d32a4fa.zip
PR10913: Fix error messages when unable to close certain tokens
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/parse.cxx b/parse.cxx
index 06ba88e9..6cdf76d9 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -894,8 +894,7 @@ skip:
if (c < 0 || c == '\n')
{
- n->type = tok_junk;
- break;
+ throw parse_error("Could not find matching closing quote", n);
}
if (c == '\"') // closing double-quotes
break;
@@ -994,8 +993,8 @@ skip:
c = c2;
c2 = input_get ();
}
- n->type = tok_junk;
- return n;
+
+ throw parse_error ("Could not find matching '%}' to close embedded function block", n);
}
// We're committed to recognizing at least the first character