src: allow fatal exceptions to be enhanced
This commit allows fatal exceptions to be enhanced so that exceptions thrown from an 'unhandledException'
handler have the stack attached properly.
I still need to add a test, but first I want to make sure the approach is acceptable. If it's not, another approach could be passing kEnhance
/kDontEnhance
to the TryCatchScope
constructor.
Fixes: https://github.com/nodejs/node/issues/28550
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines