Skip to main content

tramlines_core/
error.rs

1//! The engine's one error type: a grammar the engine carries that does not
2//! read, which is a defect of the build, never of a user's input.
3
4/// Convenience alias for results from this crate.
5pub type Result<T> = std::result::Result<T, Error>;
6
7// sokf:begin error
8/// Errors produced by this crate.
9#[derive(Debug, thiserror::Error)]
10pub enum Error {
11    /// A broken invariant.
12    #[error("internal: {0}")]
13    Internal(String),
14}
15// sokf:end error