1use std::path::PathBuf;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
6pub enum FileSystemError {
7 #[error("gameinfo.txt not found in {0}")]
9 GameInfoNotFound(PathBuf),
10
11 #[error("invalid game path (missing parent or file name): {0}")]
13 InvalidGamePath(PathBuf),
14
15 #[error("failed to parse gameinfo.txt")]
17 GameInfoParseError,
18
19 #[cfg(feature = "steam")]
21 #[error("steamlocate error: {0}")]
22 SteamLocateError(#[from] steamlocate::Error),
23
24 #[cfg(feature = "steam")]
26 #[error("steam app {0} not found")]
27 SteamAppNotFound(u32),
28
29 #[cfg(feature = "steam")]
31 #[error("steam installation not found")]
32 SteamNotFound,
33}