swarm repositories / source
aboutsummaryrefslogtreecommitdiff
path: root/crates/fidget-spinner-core/src/error.rs
blob: eb05ba759713aae5e1820470d5f33f488ab1aa3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Clone, Debug, Eq, Error, PartialEq)]
pub enum CoreError {
    #[error("text values must not be blank")]
    EmptyText,
    #[error("tag names must not be blank")]
    EmptyTagName,
    #[error(
        "invalid tag name `{0}`; expected lowercase ascii alphanumerics separated by `-`, `_`, or `/`"
    )]
    InvalidTagName(String),
    #[error("command recipes must contain at least one argv element")]
    EmptyCommand,
}