nika_event/error.rs
1use thiserror::Error;
2
3/// Errors that can occur in the event system.
4#[derive(Debug, Error)]
5pub enum EventError {
6 #[error("Failed to write trace: {0}")]
7 TraceWrite(#[from] std::io::Error),
8
9 #[error("Failed to serialize event: {0}")]
10 Serialization(#[from] serde_json::Error),
11}
12
13/// Result type for event operations.
14pub type Result<T> = std::result::Result<T, EventError>;