tp_lib_core/
errors.rs

1//! Error types for projection operations
2
3use thiserror::Error;
4
5/// Errors that can occur during GNSS projection operations
6#[derive(Error, Debug)]
7pub enum ProjectionError {
8    #[error("Invalid CRS: {0}")]
9    InvalidCrs(String),
10
11    #[error("CRS transformation failed: {0}")]
12    TransformFailed(String),
13
14    #[error("Invalid coordinate: {0}")]
15    InvalidCoordinate(String),
16
17    #[error("Missing timezone information: {0}")]
18    MissingTimezone(String),
19
20    #[error("Invalid timestamp: {0}")]
21    InvalidTimestamp(String),
22
23    #[error("Empty railway network")]
24    EmptyNetwork,
25
26    #[error("Invalid geometry: {0}")]
27    InvalidGeometry(String),
28
29    #[error("CSV error: {0}")]
30    CsvError(#[from] csv::Error),
31
32    #[error("GeoJSON error: {0}")]
33    GeoJsonError(String),
34
35    #[error("I/O error: {0}")]
36    IoError(#[from] std::io::Error),
37}