-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
b98
-
generic
-
generic
-
Verified
error.stack is a string where frame info is separated by "\n" chars in other implementations. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack
In Nashorn, error.stack evaluates to an array of StackTraceElement objects. It is better if we follow other implementation to be compatible. We could add Error.prototype.getStackTrace function which returns array of StackTraceElement for script frames (just like java.lang.Throwable.getStackTrace() returns an array of all frames).
In Nashorn, error.stack evaluates to an array of StackTraceElement objects. It is better if we follow other implementation to be compatible. We could add Error.prototype.getStackTrace function which returns array of StackTraceElement for script frames (just like java.lang.Throwable.getStackTrace() returns an array of all frames).