-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: core-libs
-
None
-
b98
-
generic
-
generic
-
Verified
nashorn needs to support the api to capture a stack trace at a given point, as v8 does - see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
a sample program -
function MyError() {
Error.captureStackTrace(this, MyError);
}
var e = new MyError();
print(e.stack);
prints
[object Object]
at error.js:5:9
with d8, whereas with nashorn it prints
error.js:2 TypeError: Cannot call undefined
a sample program -
function MyError() {
Error.captureStackTrace(this, MyError);
}
var e = new MyError();
print(e.stack);
prints
[object Object]
at error.js:5:9
with d8, whereas with nashorn it prints
error.js:2 TypeError: Cannot call undefined