1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum CoreError {
5 #[error("invalid entity path {path:?}: {reason}")]
6 InvalidEntityPath { path: String, reason: &'static str },
7
8 #[error("negative timestamp {t_ns} ns on {entity:?}/{component:?}")]
9 NegativeTimestamp {
10 t_ns: i64,
11 entity: String,
12 component: String,
13 },
14
15 #[error("component kind {name:?} is not recognised")]
16 UnknownComponentKind { name: String },
17
18 #[error("arrow error: {0}")]
19 Arrow(#[from] arrow::error::ArrowError),
20
21 #[error("schema mismatch: expected {expected}, got {got}")]
22 SchemaMismatch { expected: String, got: String },
23}
24
25pub type Result<T> = std::result::Result<T, CoreError>;