src: ERR_ILLEGAL_CONSTRUCTOR thrown from c++ had the wrong constructor#58364
Open
nektro wants to merge 1 commit intonodejs:mainfrom
Open
src: ERR_ILLEGAL_CONSTRUCTOR thrown from c++ had the wrong constructor#58364nektro wants to merge 1 commit intonodejs:mainfrom
nektro wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #58364 +/- ##
==========================================
- Coverage 90.24% 90.19% -0.05%
==========================================
Files 633 635 +2
Lines 186859 187171 +312
Branches 36685 36750 +65
==========================================
+ Hits 168622 168811 +189
- Misses 11036 11124 +88
- Partials 7201 7236 +35
🚀 New features to boost your workflow:
|
jasnell
approved these changes
May 17, 2025
Member
jasnell
left a comment
There was a problem hiding this comment.
I'm fine with this but keep in mind that changing the error type is semver-major
Contributor
|
The commit message should start with a verb in infinitive form, e.g. |
89c79b5 to
ad03a4a
Compare
Contributor
Author
|
bump |
aduh95
reviewed
Sep 6, 2025
Comment on lines
+26
to
+27
| assert(cp.stderr.includes(`TypeError: Illegal constructor\n`)); | ||
| assert(cp.stderr.includes(`code: 'ERR_ILLEGAL_CONSTRUCTOR'\n`)); |
Contributor
There was a problem hiding this comment.
Can you use assert.match so in case of failure we get a more informative error message?
Suggested change
| assert(cp.stderr.includes(`TypeError: Illegal constructor\n`)); | |
| assert(cp.stderr.includes(`code: 'ERR_ILLEGAL_CONSTRUCTOR'\n`)); | |
| assert.match(cp.stderr, /TypeError: Illegal constructor\n(.*\n)*\s*code: 'ERR_ILLEGAL_CONSTRUCTOR'\n/); |
aduh95
reviewed
Sep 6, 2025
| name: 'TypeError', | ||
| code: 'ERR_ILLEGAL_CONSTRUCTOR', | ||
| message: /Illegal constructor/, | ||
| message: 'Illegal constructor', |
Contributor
There was a problem hiding this comment.
We don't need to test the message
Suggested change
| message: 'Illegal constructor', |
avivkeller
approved these changes
Jan 3, 2026
Member
|
@nektro Please rebase :-) |
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.
this brings it into sync with the definition of this error in
lib/internal/errors.js.