osu_file_parser/osu_file/metadata/
error.rs1use thiserror::Error;
2
3use std::num::ParseIntError;
4
5use crate::helper::macros::unreachable_err_impl;
6
7#[derive(Debug, Error)]
8#[non_exhaustive]
9pub enum ParseError {
11 #[error("There is a duplicate field in the `Metadata` section")]
13 DuplicateField,
14 #[error(transparent)]
16 ParseIntError(#[from] ParseIntError),
17 #[error("Invalid colon set, expected format of `key: value`")]
19 InvalidColonSet,
20 #[error("The key doesn't exist in `General`")]
22 InvalidKey,
23}
24
25unreachable_err_impl!(ParseError);