From 68c4d2d291c8da03798164f0740ed18889f09db3 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 24 Nov 2014 12:59:02 +0100 Subject: fixed #131 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and display an error if a reporter or a “called” ring is missing a “report” statement --- threads.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 574fd35..9161417 100644 --- a/threads.js +++ b/threads.js @@ -698,7 +698,7 @@ Process.prototype.doYield = function () { Process.prototype.exitReporter = function () { // catch-tag for REPORT and STOP BLOCK primitives - this.popContext(); + this.handleError(new Error("missing 'report' statement in reporter")); }; // Process Exception Handling @@ -1098,6 +1098,7 @@ Process.prototype.evaluateCustomBlock = function () { outer.receiver ); runnable.parentContext = exit; + this.popContext(); // don't yield when done } else { // tag all "stop this block" blocks with the current // procedureCount as exitTag, and mark all "report" blocks -- cgit v1.3.1