Strongly typed errors would be helpful: ```rust #[non_exhaustive] pub struct PatternError { pub pos: usize, pub msg: PattternErrorKind, } #[non_exhaustive] enum PattternErrorKind { // ... } ```