unicode-org / message-format-wg

Developing a standard for localizable message strings
Other
209 stars 32 forks source link

Fix #782: give implementations more flexibility in error handling #795

Open mihnita opened 1 month ago

macchiati commented 1 month ago

Someone could design an API like (in pseudocode). I'd argue that such an API should be allowed to be conformant. In particular, what the formatter is expected to do can depend on what the caller tells it to do.

try {

On Thu, May 16, 2024 at 2:38 PM Eemeli Aro @.***> wrote:

@.**** requested changes on this pull request.

This is going to need a design doc to explain the change.

At the moment, the spec is providing exactly one choice for what an MF2 formatter is expected to do when a runtime error occurs: Provide some representation of the message, and separately report the error or errors.

The proposed change would be to remove this requirement completely, and allow any of the following to occur:

  1. A message with fallback contents is provided, and errors are swallowed.
  2. A message with fallback contents is provided, and errors are also emitted.
  3. No message is provided, and an error is emitted.

I don't think that's a good idea, and I think this is something on which it's appropriate for us to be opinionated.

— Reply to this email directly, view it on GitHub https://github.com/unicode-org/message-format-wg/pull/795#pullrequestreview-2061932643, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMFXUWJLNTHYX2LDLYLZCURL3AVCNFSM6AAAAABH233XSKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANRRHEZTENRUGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>