rust_persian_tools/number_to_words/
error.rs1use thiserror::Error;
2
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4#[derive(Error, Clone, Debug, Hash, PartialEq, Eq)]
5pub enum NumberToWordsError {
6 #[error("The input is empty.")]
7 EmptyString,
8
9 #[error("There is an invalid integer in the input: \"{0}\"")]
10 InvalidInteger(String),
11
12 #[error("Overflow occurred while processing the integer: \"{0}\"")]
13 Overflow(String),
14
15 #[error("Unknown error occurred: \"{0}\"")]
16 Unknown(String),
17
18 #[error("You should not see this! Please create an issue on our GitHub repository.")]
19 Internal,
20}