Unverified Commit d47b6786 authored by Ruben Bridgewater's avatar Ruben Bridgewater
Browse files

assert: wrap validation function errors

This makes sure that validation function used by `assert.throws` and
`assert.rejects` always throw validatin errors instead of rethrowing
the received error.

That should improve the debugging experience for developers since
they have a better context where the error is coming from and they
also get to know what triggered it.

PR-URL: https://github.com/nodejs/node/pull/28263


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 0b3242c3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment