Skip to content

Allow for implementation-defined Error properties#4433

Merged
Ms2ger merged 1 commit intotc39:mainfrom
anba:supressed-error-extensions
Mar 24, 2025
Merged

Allow for implementation-defined Error properties#4433
Ms2ger merged 1 commit intotc39:mainfrom
anba:supressed-error-extensions

Conversation

@anba
Copy link
Copy Markdown
Contributor

@anba anba commented Mar 21, 2025

Various implementations (JSC, V8, SM) define additional properties on Error instances. Adjust the test case to account for that.

@anba anba requested a review from a team as a code owner March 21, 2025 15:24
Copy link
Copy Markdown
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note to the test why it's written this way

@anba anba force-pushed the supressed-error-extensions branch from 3817ba8 to e776756 Compare March 21, 2025 16:58
@anba
Copy link
Copy Markdown
Contributor Author

anba commented Mar 21, 2025

Please add a note to the test why it's written this way

Done. Added the following comment:

// Allow implementation-defined properties before "message" and after "suppressed".

Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be cleaner to slice keys at messageIndex for 3 total items, and compareArray, but either way is fine

Various implementations (JSC, V8, SM) define additional properties on
Error instances. Adjust the test case to account for that.
@Ms2ger Ms2ger force-pushed the supressed-error-extensions branch from e776756 to 3d7ace0 Compare March 24, 2025 08:43
@Ms2ger Ms2ger merged commit f5bf9fd into tc39:main Mar 24, 2025
10 of 11 checks passed
@anba anba deleted the supressed-error-extensions branch May 17, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants