1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use thiserror::Error;
use crate::helper::macros::unreachable_err_impl;
#[derive(Debug, Error)]
#[non_exhaustive]
/// Error used when there was a problem parsing the `Difficulty` section.
pub enum ParseError {
/// When the line isn't in a `key: value` format.
#[error("Invalid colon set, expected format of `key: value`")]
InvalidColonSet,
/// Invalid key name was used.
#[error("The key doesn't exist in `Difficulty`")]
InvalidKey,
/// There is a duplicate field in `Difficulty`.
#[error("Duplicate field in `Difficulty`")]
DuplicateField,
}
unreachable_err_impl!(ParseError);