aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 690ddc3c..fae4c714 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -41,10 +41,13 @@ INDENT = '';
START_TIME = Date.now();
#endif
+ABORT = false;
+
function assert(condition, text) {
if (!condition) {
var text = "Assertion failed: " + text;
print(text + ':\n' + (new Error).stack);
+ ABORT = true;
throw "Assertion: " + text;
}
}