forked from nodejs/node
-
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.
doc: remove all references to internal AbortError
This is done to prepare user code for signal.reason, which will allow custom errors to be thrown on aborts. Custom errors means that it will not be possible to conclusively determine if an error is from an `ac.abort()`, just by looking at it. By not declaring what error is thrown, node is also free to change it to `new DOMException(message, 'AbortError')` in a future release. This also avoids the possible addition of a public `AbortError` to node. The thrown errors will remain instances of the internal `AbortError` for now, to avoid effecting existing user code. While signal.aborted can be used to detect aborted errors in most cases, it does fully not work for the stream pipeline API, where individual streams are destroyed with `stream.destroy(new AbortError())`. Here the stream can no longer fully detect aborts. However, I don't think this is ever relevant, as streams should always perform the same cleanup logic, regardless of what error is passed. If it doesn't support a signal option, it does not make sense to include logic to handle signal aborts. Refs: nodejs#40692 Refs: nodejs#38361 Refs: whatwg/dom#1027
- Loading branch information
Showing
6 changed files
with
36 additions
and
33 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
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
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