h3ron_graph/
error.rs

1use thiserror::Error as ThisError;
2
3#[derive(ThisError, Debug)]
4pub enum Error {
5    #[error("h3ron error: {0}")]
6    H3ron(#[from] h3ron::Error),
7
8    #[error("io error: {0}")]
9    IOError(#[from] std::io::Error),
10
11    #[error("mixed h3 resolutions: {0} <> {1}")]
12    MixedH3Resolutions(u8, u8),
13
14    #[error("too high h3 resolution: {0}")]
15    TooHighH3Resolution(u8),
16
17    #[error("empty path")]
18    EmptyPath,
19
20    #[error("none of the routing destinations is part of the routing graph")]
21    DestinationsNotInGraph,
22
23    #[error("other error: {0}")]
24    Other(String),
25
26    #[error("insufficient number of edges")]
27    InsufficientNumberOfEdges,
28
29    #[error("path is segmented into multiple parts")]
30    SegmentedPath,
31
32    #[error("unknown error: {0}")]
33    UnknownWithMessage(String),
34}