badge_maker/error/
mod.rs

1use std::fmt::Debug;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum Error {
6    #[error("Message field not set on builder. Unable to make Format.")]
7    MessageNotSet,
8    #[error("The string `{0}` could not be parsed as a valid color option.")]
9    BadColorString(String),
10    #[error(
11        "The string `{0}` could not be parsed as a valid style option.\
12   Try one of (Flat, Plastic, FlatSquare, ForTheBadge, Social). Capitalization does not matter."
13    )]
14    BadStyleChoice(String),
15    #[error("Font was not found when loading")]
16    UnableToLoadFont,
17}