Skip to content

more user-friendly jsg exception message#2532

Merged
mikea merged 1 commit intomainfrom
mikea-patch-2
Aug 19, 2024
Merged

more user-friendly jsg exception message#2532
mikea merged 1 commit intomainfrom
mikea-patch-2

Conversation

@mikea
Copy link
Copy Markdown
Contributor

@mikea mikea commented Aug 14, 2024

Strictly speaking this is not backward compatible, but I doubt anyone cares and it has saved me some time while debugging an issue.

Strictly speaking this is not backward compatible, but I doubt anyone cares and it has saved me some time while debugging an issue.
@mikea mikea requested review from anonrig and jasnell August 14, 2024 14:31
@mikea mikea requested review from a team as code owners August 14, 2024 14:31
}
jsg::throwTypeError(isolate, "Cannot initialize a dictionary with required members from an "
"undefined or null value.");
jsg::throwTypeError(isolate, kj::str("Cannot initialize ", typeid(T).name(),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

minor nit but is this going to give a user friendly name that is useful for end users or something only we can appreciate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Friendliness is debatable, but this is definitely something that will have a name similar to TS type.

@mikea mikea merged commit 8b8f52d into main Aug 19, 2024
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.

4 participants