Skip to content

Commit a311ca8

Browse files
committed
display instruction limit exceeded error
1 parent 3198f9d commit a311ca8

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

v3/js/opt-live.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ function updateStepLabels() {
191191
myVisualizer.curLineNumber - 1, 1), "errorLine", "fullLine");
192192
allMarkerIds.push(markerId);
193193
}
194+
} else if (myVisualizer.instrLimitReached) {
195+
$("#frontendErrorOutput").html(htmlspecialchars(myVisualizer.instrLimitReachedWarningMsg));
194196
} else {
195197
$("#frontendErrorOutput").html(''); // clear it
196198
}

v3/js/pytutor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ ExecutionVisualizer.prototype.render = function() {
748748
if (this.instrLimitReached) {
749749
this.curTrace.pop() // kill last entry
750750
var warningMsg = lastEntry.exception_msg;
751+
this.instrLimitReachedWarningMsg = warningMsg;
751752
myViz.domRoot.find("#errorOutput").html(htmlspecialchars(warningMsg));
752753
myViz.domRoot.find("#errorOutput").show();
753754
}

0 commit comments

Comments
 (0)