konnektoren_core/game/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq)]
4pub enum GameError {
5    #[error("Challenge not found: {0}")]
6    ChallengeNotFound(String),
7
8    #[error("Game path not found")]
9    GamePathNotFound,
10
11    #[error("Invalid game state: {0}")]
12    InvalidGameState(String),
13
14    #[error("Challenge error: {0}")]
15    ChallengeError(#[from] crate::challenges::ChallengeError),
16}
17
18pub type Result<T> = std::result::Result<T, GameError>;