Skip to main content

serenade_view/
error.rs

1//! View helper errors.
2
3use thiserror::Error;
4
5/// Error from view helpers such as [`crate::asset`].
6#[derive(Clone, Debug, Eq, Error, PartialEq)]
7#[error("{0}")]
8pub struct ViewError(pub String);
9
10impl ViewError {
11    pub(crate) fn msg(message: impl Into<String>) -> Self {
12        Self(message.into())
13    }
14}