1use thiserror::Error;
2
3#[derive(Clone, Debug, Error)]
4#[allow(clippy::enum_variant_names)]
5pub enum Error {
6 #[error("Invalid FEN string: {fen}")]
8 InvalidFen { fen: String },
9
10 #[error("The board specified did not pass sanity checks. Are you sure the kings exist and the side to move cannot capture the opposing king?")]
12 InvalidBoard,
13
14 #[error("The string specified does not contain a valid algebraic notation square")]
16 InvalidSquare,
17
18 #[error("The string specified does not contain a valid SAN notation move")]
20 InvalidSanMove,
21
22 #[error("The string specified does not contain a valid UCI notation move")]
24 InvalidUciMove,
25
26 #[error("The string specified does not contain a valid rank")]
28 InvalidRank,
29
30 #[error("The string specified does not contain a valid file")]
32 InvalidFile,
33}