About ProtoProps (stackTraceLimit and prepareStackTrace) of NativeError #1271
-
Is there documentation about how to use stackTraceLimit and prepareStackTrace for a NativeError instance? I tried the following code but nothing printed in console: Error.prepareStackTrace = function () {
console.log(arguments);
return "test";
};
try {
(0).toFixed(-1);
} catch (e) {
// Ignored.
} Also, code like BTW, i found some code may have some relations. rhino/src/org/mozilla/javascript/NativeError.java Lines 182 to 183 in 4eeea69 What makes me confused is that L183 always got a null result (for variable "pp"). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There's no specific Rhino documentation, as it should function the same as in v8/node. You could have a look at our testcases for these option: https://github.com/mozilla/rhino/blob/1b7e8ab9f18011756e0298812497b16c41006ff7/testsrc/jstests/extensions/stack-traces-v8.js |
Beta Was this translation helpful? Give feedback.
There's no specific Rhino documentation, as it should function the same as in v8/node.
You could have a look at our testcases for these option: https://github.com/mozilla/rhino/blob/1b7e8ab9f18011756e0298812497b16c41006ff7/testsrc/jstests/extensions/stack-traces-v8.js