Our current design for TemporalError is essentially a mirror of ECMAScript's error types:
|
#[derive(Debug, Clone, PartialEq)] |
|
pub struct TemporalError { |
|
kind: ErrorKind, |
|
msg: Box<str>, |
|
} |
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).
Our current design for
TemporalErroris 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.thiserrorsounds ideal for this (moreso because it recently added support for no_std).