4 ms·
No, old style callbacks don't empty the stack on thrown errors - they crash. Long stack traces are fine, but post-mortem debugging means analyzing the entire p
by spion 10y ago
No, old style callbacks don't empty the stack on thrown errors - they crash.
Long stack traces are fine, but post-mortem debugging means analyzing the entire program's core dump. That includes everything that was in the heap at the time, and not just
the names of the functions on the stack but also their arguments (which often point to stuff in the heap). It can be used to reproduce most of the program state at the time of the crash.
The real problem is that at some point node decided that throw = programmer errors = core dump. This is wrong and misguided, but thats another story...