Skip to content

Editorial: remove stale description of how NativeErrors differ - #4096

Merged
ljharb merged 1 commit into
tc39:mainfrom
bakkot:fix-message-location
Nov 24, 2026
Merged

ljharb merged 1 commit into
tc39:mainfrom
bakkot:fix-message-location

Conversation

@bakkot

@bakkot bakkot commented Nov 19, 2026

Copy link
Copy Markdown
Member

The prototype "message" property on classes like TypeError has been defined to be the empty string since ES5; this sentence was present and accurate in ES3 (when it really was implementation-defined) but has been wrong since then.

Allen actually noticed this in 2019 and we landed a PR to remove that sentence entirely in 2024, but it got re-introduced in #3000 presumably as a rebase accident (whoops).

Remove that whole sentence again. Also fix grammar while I'm here.

@github-actions

Copy link
Copy Markdown

The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/4096 and as multiple pages at https://tc39.es/ecma262/pr/4096/multipage .

@bakkot

bakkot commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

I originally considered just removing the "prototype" part, so this would be "Each of these objects has the structure described below, differing only in [...] the implementation-defined "message" property" but "these objects" describes the constructors, not instances, so that would still be wrong.

It is pretty weird that we don't ever say that implementations are allowed to define own "message" properties when throwing errors. We just say "a newly created TypeError object" and make no mention of properties.

@nicolo-ribaudo nicolo-ribaudo added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Nov 23, 2026
@ljharb
ljharb force-pushed the fix-message-location branch from 1ff5d71 to 7cff4af Compare November 24, 2026 00:10
@ljharb
ljharb merged commit 7cff4af into tc39:main Nov 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants