Better error messages for Temporal parser
Categories
(Core :: JavaScript: Standard Library, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Assignee | ||
Comment 1•1 month ago
|
||
Improves the error message for Temporal.Duration.from("P1")
from:
"RangeError: unexpected garbage after end of input"
to:
"RangeError: missing duration unit designator"
Assignee | ||
Comment 2•1 month ago
|
||
Improves the error message when multiple parse goals are tried.
For example Temporal.PlainTime.from("10:00Z")
reported:
"RangeError: missing four digit year"
but is now reporting:
"RangeError: unexpected UTC designator 'Z'"
Assignee | ||
Comment 3•1 month ago
|
||
Assignee | ||
Comment 4•1 month ago
|
||
Improve the error message to indicate there was an error while parsing a
string. And add the parse goal to give a hint how the string was parsed.
Assignee | ||
Comment 5•1 month ago
|
||
Updated•29 days ago
|
Comment 7•28 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c6f922ad21c6
https://hg.mozilla.org/mozilla-central/rev/1e6ac0d665fd
https://hg.mozilla.org/mozilla-central/rev/a3a22dde7373
https://hg.mozilla.org/mozilla-central/rev/94ea0a0d0a5c
https://hg.mozilla.org/mozilla-central/rev/28c0017a7853
Description
•