1use failure::Fail;
2
3#[derive(Clone, Debug, Fail)]
5pub enum Error {
6 #[fail(display = "Invalid FEN string: {}", fen)]
8 InvalidFen { fen: String },
9
10 #[fail(
12 display = "The board specified did not pass sanity checks. Are you sure the kings exist and the side to move cannot capture the opposing king?"
13 )]
14 InvalidBoard,
15
16 #[fail(display = "The string specified does not contain a valid algebraic notation square")]
18 InvalidSquare,
19
20 #[fail(display = "The string specified does not contain a valid SAN notation move")]
22 InvalidSanMove,
23
24 #[fail(display = "The string specified does not contain a valid UCI notation move")]
26 InvalidUciMove,
27
28 #[fail(display = "The string specified does not contain a valid rank")]
30 InvalidRank,
31
32 #[fail(display = "The string specified does not contain a valid file")]
34 InvalidFile,
35}