Skip to content

util: fix inspection of errors with tampered name or stack property

This makes sure that util.inspect() does not throw while inspecting errors that have the name or stack property set to a different type than string.

Fixes: https://github.com/nodejs/node/issues/30572

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading