Open davidtaylorhq opened 2 years ago
That's probably a tricky one, good find though, @davidtaylorhq and thx for reporting!
"Parsing" a JavaScript error seems to be a lot more complicated.
There is a special stack trace API (https://v8.dev/docs/stack-trace-api) in V8 that we might be able to hook into. In any case it would be super useful to have more then just the string representation in Ruby-land. Any idea if that would be possible, @SamSaffron? That might also be interesting for https://github.com/rubyjs/mini_racer/issues/129 and could could help making this way more robust.
This will output
The missing lines incorrectly appear as part of
e.backtrace
:The relevant code is:
https://github.com/rubyjs/mini_racer/blob/719abdb1a4881d65831830e6e6fb5ca1bcedbc1e/lib/mini_racer.rb#L44-L54