use thiserror::Error;
use std::num::ParseIntError;
use crate::helper::macros::unreachable_err_impl;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ParseError {
#[error("There is a duplicate field in the `Metadata` section")]
DuplicateField,
#[error(transparent)]
ParseIntError(#[from] ParseIntError),
#[error("Invalid colon set, expected format of `key: value`")]
InvalidColonSet,
#[error("The key doesn't exist in `General`")]
InvalidKey,
}
unreachable_err_impl!(ParseError);