Open
Bug 1839676
Opened 2 years ago
Updated 1 month ago
[meta] Improve error messages for Temporal
Categories
(Core :: JavaScript: Standard Library, task, P3)
Core
JavaScript: Standard Library
Tracking
()
NEW
People
(Reporter: anba, Unassigned)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
(Keywords: meta)
Improve the error messages for Temporal. For example when parsing fails in TemporalParser, the error message could include (parts of) the input string to give better feedback which part couldn't be parsed:
js> Temporal.Instant.from("2023-01-01T00:00[UTC]")
typein:1:18 RangeError: missing time zone
Stack:
@typein:1:18
js> Temporal.Instant.from("2023-01-01T00:00Z[UTC]").toString()
"2023-01-01T00:00:00Z"
Just reporting "RangeError: missing time zone" isn't helpful, in this specific case the error message could indicate that either a time zone offset or Z must be present before the time zone annotation.
Error message improvements should happen in individual bugs that block this bug.
Updated•2 years ago
|
Summary: Improve error messages for Temporal → [meta] Improve error messages for Temporal
Updated•2 years ago
|
Severity: -- → S3
Priority: -- → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•