Update internal util isError with new Error.isError
With Version 24.0.0 V8 will be updated to 13.4 and Error.isError will be available, with that we can update the way we check if an object is an error in some places.
Following @jasnell suggestion in @geeksilva97 PR https://github.com/nodejs/node/pull/55406, I would like to start some issues regarding where this change is necessary, starting with the isError present in lib/internal/util
We should probably deprecate util.types.isNativeError as well as of v24?
I remember deprecating all the all the util.is functions.
util.isError is in fact EOL
https://nodejs.org/api/deprecations.html#DEP0048
If its not used anywhere in the codebase it can be removed
I remember deprecating all the all the
util.isfunctions.util.isErroris in fact EOL https://nodejs.org/api/deprecations.html#DEP0048 If its not used anywhere in the codebase it can be removed
You're right about that, but this one is related to isError from the internal helper.
We should probably deprecate
util.types.isNativeErroras well as of v24?
FWIW, I'm seeing a 50% performance regression for Error.isError over the current util/types IsNativeError binding in the latest build.