Migrate errors to static enums #113
Labels
C-internal
Internal library improvements
E-easy
Easy issue to fix - Good for newcomers
E-help wanted
Extra attention is needed
Our current design for
TemporalError
is essentially a mirror of ECMAScript's error types:temporal/src/error.rs
Lines 39 to 43 in 345ad54
This works well for engines that have thousands of errors, with each one having a custom message. However, I don't think we need to do that for
temporal_rs
, and a more rusty approach will be better suited for this.thiserror
sounds ideal for this (moreso because it recently added support for no_std).The text was updated successfully, but these errors were encountered: