use thiserror::Error;
#[derive(Clone, Debug, Error)]
pub enum ServiceError {
#[error("invalid arguments: expected {expected}, got {found}")]
TypeMismatch {
expected: String,
found: String,
},
#[error("unknown method: {0}")]
UnknownMethod(String),
#[error("service domain not found: {0}")]
DomainNotFound(String),
#[error("file not found in registry: {domain}/{filename}")]
FileNotFound {
domain: String,
filename: String,
},
#[error("registry domain not found: {0}")]
RegistryDomainNotFound(String),
#[error("entity not found: {0}")]
EntityNotFound(u64),
#[error("component '{type_name}' not found on entity {entity}")]
ComponentNotFound {
entity: u64,
type_name: String,
},
#[error("content file not found: {0}")]
ContentFileNotFound(String),
#[error("parse error: {0}")]
ParseError(String),
#[error("internal error: {0}")]
Internal(String),
}