aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/postamble.js b/src/postamble.js
index df844121..897bb269 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -126,7 +126,15 @@ function exit(status) {
// exit the runtime
exitRuntime();
-
+
+ // TODO We should handle this differently based on environment.
+ // In the browser, the best we can do is throw an exception
+ // to halt execution, but in node we could process.exit and
+ // I'd imagine SM shell would have something equivalent.
+ // This would let us set a proper exit status (which
+ // would be great for checking test exit statuses).
+ // https://github.com/kripken/emscripten/issues/1371
+
// throw an exception to halt the current execution
throw new ExitStatus(status);
}