optional-catch-binding.md: Correct supported Node#562
Merged
mathiasbynens merged 1 commit intov8:mainfrom Jun 22, 2021
Merged
Conversation
Node 10 updated its copy of V8 10 V8 6.6, thereby adding support for catch blocks with optional/no error binding. Node 8 still has V8 engine version 6.2 or older.
mathiasbynens
approved these changes
Jun 22, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi folks. I noticed the "support" info box at the bottom of https://v8.dev/features/optional-catch-binding has the wrong NodeJS version listed. It should be Node 10, but it lists Node 8.
(Optional catch binding is an ECMAScript 2019 feature... V8 first added support for this feature in V8 version 6.6. Node didn't update its V8 engine version to 6.6 until Node v10.0.0.)
See:
When I do `node -e 'console.log(process.versions)' with the latest Node 8.x, latest Node 9.x, and Node 10.0.0, I get...
Testing with the following file reveals that Node 10 supports optional catch binding, Node 8 and 9 don't.
With Node 8 and 9, I get the following error:
With Node 10 I get the catch block executing properly, indicating optional catch binding is working: