src: handle errors while printing error objects
Handle situations where accessing .name
or .stack
on an object
fails.
Fixes: https://github.com/nodejs/node/issues/25718
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines