use crate::{format, Rc};
type String = Rc<str>;
#[derive(Debug, Clone, thiserror::Error)]
pub enum TargetError {
#[error("JSON parse error: {0}")]
JsonParseError(String),
#[error("Deserialization error: {0}")]
DeserializationError(String),
#[error("Duplicate constant value: {0}")]
DuplicateConstantValue(String),
#[error("Multiple default schemas: {0}")]
MultipleDefaultSchemas(String),
#[error("Empty resource schemas: {0}")]
EmptyResourceSchemas(String),
#[error("Empty effect schemas: {0}")]
EmptyEffectSchemas(String),
}
impl From<serde_json::Error> for TargetError {
fn from(error: serde_json::Error) -> Self {
TargetError::JsonParseError(format!("{}", error).into())
}
}