diff options
| author | jmoenig <jens@moenig.org> | 2014-11-24 12:59:02 +0100 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-11-24 12:59:02 +0100 |
| commit | 68c4d2d291c8da03798164f0740ed18889f09db3 (patch) | |
| tree | fc4316824a538b398f8dd024d0db312c6523f1f3 /threads.js | |
| parent | 2cee474cb676f9ad04d55cc25f8d3fc42c002cce (diff) | |
| download | snap-68c4d2d291c8da03798164f0740ed18889f09db3.tar.gz snap-68c4d2d291c8da03798164f0740ed18889f09db3.zip | |
fixed #131
and display an error if a reporter or a “called” ring is missing a
“report” statement
Diffstat (limited to 'threads.js')
| -rw-r--r-- | threads.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |
