Align JavaScript runtime error messages with V8/Node.js#2367
Merged
Conversation
Add missing error messages to ~110 bare Throw.TypeError/RangeError/SyntaxError calls and correct ~40 existing messages that didn't match V8 output. All messages were validated against Node.js locally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
lahma
force-pushed
the
align-error-messages
branch
from
March 26, 2026 09:39
7162cef to
5e679bb
Compare
lahma
enabled auto-merge (squash)
March 26, 2026 09:42
This was referenced Mar 27, 2026
This was referenced Jun 8, 2026
This was referenced Jun 29, 2026
This was referenced Jul 7, 2026
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.
Summary
Throw.TypeError/RangeError/SyntaxErrorcalls that previously produced empty errorsKey changes
"Constructor X requires 'new'"to 15 constructors"X.prototype.Y requires that 'this' be a Z"for Number, Boolean, BigInt, String, Symbol"Cannot read properties of X (reading 'Y')""Invalid limit"→"{value} must be positive"to match Node.jsObject.definePropertiestypo,Number.prototype.toFixed()prefix, Promise"resolver"vs"executor", RegExp flag getter messages,"Invalid left-hand side in assignment", BigInt>>>specific message, and moreScope
Only user-facing JavaScript runtime errors (TypeError, RangeError, SyntaxError, ReferenceError). Internal CLR exceptions (NotImplementedException, ArgumentException, etc.) are out of scope.
Test plan
dotnet test --configuration Release Jint.Tests/Jint.Tests.csproj— 2784 passed, 0 faileddotnet test --configuration Release Jint.Tests.Test262/Jint.Tests.Test262.csproj— 95,985 passed, 0 failed🤖 Generated with Claude Code