aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-20 15:45:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-20 15:45:48 -0700
commit187d2517eebb3d92921f9183609f0aa681492f37 (patch)
tree9d8542e4f3c06697e12f2934f2cb4e81abeadb7a /src/library.js
parent6159c4f1565a180999563dc70092f2db2e0b6562 (diff)
remove CATCH_EXIT_CODE and make it the default behavior
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/library.js b/src/library.js
index aebad63b..3ee6f505 100644
--- a/src/library.js
+++ b/src/library.js
@@ -2061,24 +2061,19 @@ LibraryManager.library = {
// void _exit(int status);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html
-#if CATCH_EXIT_CODE
function ExitStatus() {
this.name = "ExitStatus";
this.message = "Program terminated with exit(" + status + ")";
this.status = status;
+ Module.print('Exit Status: ' + status);
};
ExitStatus.prototype = new Error();
ExitStatus.prototype.constructor = ExitStatus;
-#endif
exitRuntime();
ABORT = true;
-#if CATCH_EXIT_CODE
throw new ExitStatus();
-#else
- throw 'exit(' + status + ') called, at ' + new Error().stack;
-#endif
},
fork__deps: ['__setErrNo', '$ERRNO_CODES'],
fork: function() {