actor_framework/
error.rs

1//! # Framework Errors
2//!
3//! This module defines the common error types used throughout the actor framework.
4//! By centralizing error definitions, we ensure consistent error handling across
5//! all actors and clients.
6
7/// Errors that can occur within the actor framework itself.
8#[derive(Debug, thiserror::Error)]
9pub enum FrameworkError {
10    #[error("Actor closed")]
11    ActorClosed,
12    #[error("Actor dropped response channel")]
13    ActorDropped,
14    #[error("Item not found: {0}")]
15    NotFound(String),
16    #[error("Entity error: {0}")]
17    EntityError(Box<dyn std::error::Error + Send + Sync>),
18}