1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum CopcError {
6 #[error("I/O error: {0}")]
8 Io(#[from] std::io::Error),
9
10 #[error("LAS error: {0}")]
12 Las(#[from] las::Error),
13
14 #[error("LAZ error: {0}")]
16 Laz(#[from] laz::LasZipError),
17
18 #[error("COPC info VLR not found")]
20 CopcInfoNotFound,
21
22 #[error("LAZ VLR not found")]
24 LazVlrNotFound,
25
26 #[error("hierarchy page at offset {offset} truncated")]
28 TruncatedHierarchyPage {
29 offset: u64,
31 },
32
33 #[error("byte source error: {0}")]
35 ByteSource(Box<dyn std::error::Error + Send + Sync>),
36}