diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-08-28 20:29:51 +0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-13 10:07:02 -0700 |
commit | e8d0f4206db235b300fdbd82c53255a58b021005 (patch) | |
tree | 0c2aad78edc7f17453de4bdc11db6f6d17a7d190 | |
parent | c1553c6058d63d81872682c09696f1133ffce851 (diff) |
Provide better impl of __assert_fail().
-rw-r--r-- | src/library.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js index 411853ef..d947ebfe 100644 --- a/src/library.js +++ b/src/library.js @@ -4287,9 +4287,9 @@ LibraryManager.library = { throw 'trap! ' + new Error().stack; }, - __assert_fail: function(condition, file, line) { + __assert_fail: function(condition, filename, line, func) { ABORT = true; - throw 'Assertion failed: ' + Pointer_stringify(condition) + ' at ' + new Error().stack; + throw 'Assertion failed: ' + Pointer_stringify(condition) + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + new Error().stack; }, __assert_func: function(filename, line, func, condition) { |