Closed SamSaffron closed 10 months ago
Ideally yes, it would be nice to capture the exception at the point it occurred. This can be very hard to do in practice though especially since you can have several JavaScript call stacks from different contexts embedded within each other. Currently, we will report them all.
I recall trying to collect this information at the site of the exception, and having a rough time of it. The current implementation was definitely a "phew, got something working." solution.
I was debugging a hard deadlock in Discourse today and found the V8::Error aquires a lock when its extracting backtraces from the vm.
This can lead to all sorts of very had to debug issues.
To work around I put this in place
https://github.com/discourse/discourse/commit/1556548ff6633cbfac8f463a82628f45afb24856
However, I feel that the ruby racer should simply calculate the backtrace at the point in time that the vm chokes and then it will not need to get access to the vm.