#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum RmAccessError {
#[error("schema directory `{directory}` could not be read")]
Directory {
directory: String,
#[source]
source: std::io::Error,
},
#[error("schema file `{path}` could not be read")]
File {
path: String,
#[source]
source: std::io::Error,
},
#[error("schema file `{path}` was refused")]
Schema {
path: String,
#[source]
source: crate::v1_1::bmm_persistence::error::PBmmReadError,
},
#[error("schema id `{id}` is rendered by both `{first}` and `{second}`")]
DuplicateSchemaId {
id: String,
first: String,
second: String,
},
#[error("the load list names schema `{id}`, which no file in the schema directories declares")]
UnknownLoadListEntry {
id: String,
},
#[error("schema `{requester}` includes `{id}`, which is not among the read schemas")]
MissingInclude {
requester: String,
id: String,
},
#[error("schema `{schema_id}` is not loaded")]
NotLoaded {
schema_id: String,
},
#[error("schema file `{path}` describes `{descriptor}` but loaded as `{loaded}`")]
SchemaIdMismatch {
path: String,
descriptor: String,
loaded: String,
},
#[error(
"schema `{schema_id}` declares bmm_version `{found}`, which is not compatible with the P_BMM generation this software reads (`{expected}`)"
)]
IncompatibleBmmVersion {
schema_id: String,
found: String,
expected: String,
},
#[error("schema `{schema_id}` has no `schema_path` meta-data entry")]
NoSchemaPath {
schema_id: String,
},
}