1use thiserror::Error;
2use std::any::TypeId;
3
4#[derive(Error, Debug)]
5pub enum DynastyError {
6 #[error("Class {0} not found in registry")]
7 ClassNotFound(String),
8
9 #[error("Invalid inheritance: {0} cannot inherit from {1}")]
10 InvalidInheritance(String, String),
11
12 #[error("Type mismatch: expected {expected}, found {found}")]
13 TypeMismatch {
14 expected: String,
15 found: String,
16 },
17
18 #[error("Reflection error: {0}")]
19 ReflectionError(String),
20
21 #[error("Field not found: {0}")]
22 FieldNotFound(String),
23}