Skip to main content

oxigdal_copc/
error.rs

1//! Error types for oxigdal-copc
2
3use thiserror::Error;
4
5/// Errors that can occur when parsing COPC / LAS files.
6#[derive(Debug, Error)]
7pub enum CopcError {
8    /// The binary data does not conform to the expected format.
9    #[error("Invalid format: {0}")]
10    InvalidFormat(String),
11
12    /// Unsupported LAS version encountered.
13    #[error("Unsupported LAS version: {0}.{1}")]
14    UnsupportedVersion(u8, u8),
15
16    /// An I/O error occurred.
17    #[error("IO error: {0}")]
18    Io(#[from] std::io::Error),
19}