Skip to content

Please remove onError parameter from format/formatToParts #58

@FrankYFTang

Description

@FrankYFTang

Currently, the format/formatToParts function
1.3.3 Intl.MessageFormat.prototype.format ( [ values [ , onError ] ] )
and
1.3.4 Intl.MessageFormat.prototype.formatToParts ( [ values [ , onError ] ] )

has a new onError parameters and introduce a new requirement for format function in ECMA402.

https://tc39.es/proposal-intl-messageformat/#sec-intl.messageformat.prototype.format

I am very concern about this and I do not think this functionality is useful. Could we remove this functionality from this proposal and just let the format/formatToParts throw ?

How would this functionality be useful in real life programming? How would that user code looks like? Why this functionality (handling the missing data) cannot be done in the user land?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions