Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

Use 'stack' instead of 'message' to capture full stack trace. #25

Closed dustinsoftware closed 7 years ago

dustinsoftware commented 7 years ago

Instead of just a message, the exception now includes a full stack trace (similar to the V8 engine).

Found it by trial-and-error using the immediate window and referencing this file, so there may be a better way to do this.

https://github.com/Microsoft/ChakraCore/blob/8d3d7c81a585aff9afb427d0a187ffdeb05e95c3/bin/ch/WScriptJsrt.cpp#L1050

Taritsyn commented 7 years ago

Hello, Dustin!

The idea is good, but implementation bad. Not in all cases the stack property contains a value.