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).