Moved how Return exceptions were handled into evaluate_string. General file cleanups

This commit is contained in:
Jonathan Turner
2009-06-10 21:47:21 +00:00
parent a66905b292
commit 4739d67c89
2 changed files with 7 additions and 18 deletions

View File

@@ -258,6 +258,9 @@ public:
TokenPtr parent = parse(parser, tokens, filename);
value = eval_token<Eval_Engine>(engine, parent);
}
catch (const ReturnValue &rv) {
value = rv.retval;
}
catch (ParserError &pe) {
if (filename != std::string("__EVAL__")) {
std::cout << "Parsing error: \"" << pe.reason << "\" in '" << pe.location->filename << "' line: " << pe.location->start.line+1 << std::endl;