You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor errors, adding section for Message Function Errors (#774)
* Refactor errors, adding section for Message Function Errors
* Apply suggestions from code review
Co-authored-by: Addison Phillips <[email protected]>
* Apply suggestions from code review
* Drop exemplary text from Formatting Error description
* Drop "Bad Expression", add SHOULD for letting functions pick their error
* Use "appropriate" rather than "a" for Message Function Errors
Co-authored-by: Addison Phillips <[email protected]>
* Apply suggestions from code review
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Addison Phillips <[email protected]>
* Apply suggestions from code review
Co-authored-by: Addison Phillips <[email protected]>
* Drop Selection & Formatting erorrs, add Bad Selector & Bad Variant Key
* Apply suggestions from code review
Co-authored-by: Addison Phillips <[email protected]>
---------
Co-authored-by: Addison Phillips <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
@@ -684,7 +684,7 @@ numeric selectors perform as described below.
684
684
1. Else if `key` is one of the keywords `zero`, `one`, `two`, `few`, `many`, or `other`, then
685
685
1. If `key` and `keyword` consist of the same sequence of Unicode code points, then
686
686
1. Append `key` as the last element of the list `resultKeyword`.
687
-
1. Else, emit a _Selection Error_.
687
+
1. Else, emit a _Bad Variant Key_ error.
688
688
1. Return a new list whose elements are the concatenation of the elements (in order) of `resultExact` followed by the elements (in order) of `resultKeyword`.
689
689
690
690
> [!NOTE]
@@ -785,15 +785,15 @@ If no options are specified, this function defaults to the following:
785
785
The _operand_ of the `:datetime` function is either
786
786
an implementation-defined date/time type
787
787
or a _date/time literal value_, as defined in [Date and Time Operand](#date-and-time-operands).
788
-
All other _operand_ values produce an _Invalid Expression_ error.
788
+
All other _operand_ values produce a _Bad Operand_ error.
789
789
790
790
#### Options
791
791
792
792
The `:datetime` function can use either the appropriate _style options_
793
793
or can use a collection of _field options_ (but not both) to control the formatted
794
794
output.
795
795
796
-
If both are specified, an _Invalid Expression_ error MUST be emitted
796
+
If both are specified, a _Bad Option_ error MUST be emitted
797
797
and a _fallback value_ used as the resolved value of the _expression_.
798
798
799
799
> [!NOTE]
@@ -910,7 +910,7 @@ If no options are specified, this function defaults to the following:
910
910
The _operand_ of the `:date` function is either
911
911
an implementation-defined date/time type
912
912
or a _date/time literal value_, as defined in [Date and Time Operand](#date-and-time-operands).
913
-
All other _operand_ values produce an _Invalid Expression_ error.
913
+
All other _operand_ values produce a _Bad Operand_ error.
914
914
915
915
#### Options
916
916
@@ -933,7 +933,7 @@ If no options are specified, this function defaults to the following:
933
933
The _operand_ of the `:time` function is either
934
934
an implementation-defined date/time type
935
935
or a _date/time literal value_, as defined in [Date and Time Operand](#date-and-time-operands).
936
-
All other _operand_ values produce an _Invalid Expression_ error.
936
+
All other _operand_ values produce a _Bad Operand_ error.
937
937
938
938
#### Options
939
939
@@ -950,7 +950,7 @@ The function `:time` has these _options_:
950
950
The _operand_ of a date/time function is either
951
951
an implementation-defined date/time type
952
952
or a _date/time literal value_, as defined below.
953
-
All other _operand_ values produce an _Invalid Expression_ error.
953
+
All other _operand_ values produce a _Bad Operand_ error.
954
954
955
955
A **_<dfn>date/time literal value</dfn>_** is a non-empty string consisting of an ISO 8601 date,
956
956
or an ISO 8601 datetime optionally followed by a timezone offset.
@@ -972,7 +972,7 @@ For more information, see [Working with Timezones](https://w3c.github.io/timezon
972
972
> The [ABNF](/spec/message.abnf) and [syntax](/spec/syntax.md) of MF2
973
973
> do not formally define date/time literals.
974
974
> This means that a _message_ can be syntactically valid but produce
975
-
> an _Operand Mismatch Error_ at runtime.
975
+
> a _Bad Operand_ error at runtime.
976
976
977
977
> [!NOTE]
978
978
> String values passed as variables in the _formatting context_'s
0 commit comments