Skip to main content

docs_core/
error.rs

1//! Typed errors. A malformed fence names the fence; the renderer never
2//! swallows a failure silently.
3
4/// Why a document could not be rendered.
5#[derive(Debug, Clone, PartialEq, thiserror::Error)]
6pub enum DocsError {
7    /// An `island` fence carried no component name.
8    #[error("island fence without a component name: `{0}`")]
9    IslandWithoutName(String),
10    /// An island fence's body was not a JSON object.
11    #[error("island props must be a JSON object, got: `{0}`")]
12    InvalidIslandProps(String),
13}