diff options
author | alon@honor <none@none> | 2010-09-30 18:58:12 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-09-30 18:58:12 -0700 |
commit | 13e243c8cb9e4d91bc74d927fc2eabd4938c97a8 (patch) | |
tree | 56a15b1a9d6fbc04618637530f11e63d8be0e3a5 /src | |
parent | 0923eaec251fb7af9f9bf642e06d2f17fdf0f250 (diff) |
abort()
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 4 | ||||
-rw-r--r-- | src/postamble.js | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index e7c53be9..9ad35fab 100644 --- a/src/library.js +++ b/src/library.js @@ -34,6 +34,10 @@ var Library = { }, __cxa_atexit: 'atexit', + abort: function(code) { + throw 'ABORT: ' + code + ', at ' + (new Error().stack); + }, + // string.h strlen: function(p) { diff --git a/src/postamble.js b/src/postamble.js index f47f3d42..a185b306 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -30,7 +30,7 @@ function run(args) { try { run(this.arguments ? arguments : []); } catch (e) { - print("Fatal exception: " + e.stack); + print("Fatal exception: " + e); throw e; } |