aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-24 15:08:12 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-24 15:08:12 -0800
commit55cabe1fe0bee79f8d992954d9ece1245e1f01b9 (patch)
tree5117a6ce234483a0e1f1127d69bbea93cc18704c
parent3c0ad8948b599e0c4a5782709e33c82546fc427b (diff)
show js stack in C assertions
-rw-r--r--src/library.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index 190a26d3..671a6627 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4768,11 +4768,11 @@ LibraryManager.library = {
__assert_fail: function(condition, file, line) {
ABORT = true;
- throw 'Assertion failed: ' + Pointer_stringify(condition);//JSON.stringify(arguments)//condition;
+ throw 'Assertion failed: ' + Pointer_stringify(condition) + ' at ' + new Error().stack;
},
__assert_func: function(filename, line, func, condition) {
- throw 'Assertion failed: ' + (condition ? Pointer_stringify(condition) : 'unknown condition') + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'];
+ throw 'Assertion failed: ' + (condition ? Pointer_stringify(condition) : 'unknown condition') + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + new Error().stack;
},
__cxa_guard_acquire: function(variable) {