-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create custom Error constructors
As a result of nodejs/node#33857, Node errors are no longer custom error classes and .constructor is a built-in Error constructor. Therefore, to support Node 15 and later, define Error constructors for the codes used by this module in this module, as done by readable-stream and other projects. Note: Much of the code is copied from lib/internal/errors.js @ v15.0.1. ESLint rules are relaxed to make it easier to minimize divergence and make updates easier. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
- Loading branch information
Showing
2 changed files
with
262 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters