From 22f4623195facb4cbc1b50c45c0bd689f6958a9d Mon Sep 17 00:00:00 2001 From: fche Date: Sun, 5 Jun 2005 16:41:48 +0000 Subject: next/return symmetry improvement --- translate.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index df20389f..1c9724d9 100644 --- a/translate.cxx +++ b/translate.cxx @@ -698,7 +698,7 @@ void c_unparser::visit_return_statement (return_statement* s) { if (current_function == 0) - throw semantic_error ("cannot return from non-function", s->tok); + throw semantic_error ("cannot 'return' from probe", s->tok); if (s->value->type != current_function->type) throw semantic_error ("return type mismatch", current_function->tok, @@ -713,7 +713,7 @@ void c_unparser::visit_next_statement (next_statement* s) { if (current_probe == 0) - throw semantic_error ("cannot 'next' from non-probe", s->tok); + throw semantic_error ("cannot 'next' from function", s->tok); o->newline() << "goto out;"; } -- cgit