osu_file_parser/osu_file/editor/
error.rs1use std::num::ParseIntError;
2
3use thiserror::Error;
4
5use crate::helper::macros::unreachable_err_impl;
6
7#[derive(Debug, Error)]
8#[non_exhaustive]
9pub enum ParseError {
11 #[error(transparent)]
13 ParseIntError(#[from] ParseIntError),
14 #[error("Invalid colon set, expected format of `key: value`")]
16 InvalidColonSet,
17 #[error("The key doesn't exist in `Editor`")]
19 InvalidKey,
20 #[error("Invalid comma list, expected format of `key: value, value, value, ...`")]
22 InvalidCommaList,
23 #[error("Duplicate field in `Editor`")]
25 DuplicateField,
26}
27
28unreachable_err_impl!(ParseError);