Skip to main content

geopackage_core/
error.rs

1//! The crate's error type: every failure the format primitives can report.
2
3use crate::geometry::GeometryError;
4use crate::gpb::GpbError;
5use crate::tiles::TileError;
6
7/// Errors produced by this crate.
8#[derive(Debug, thiserror::Error)]
9#[non_exhaustive]
10pub enum Error {
11    /// Invalid GeoPackage Binary blob.
12    #[error(transparent)]
13    Gpb(#[from] GpbError),
14    /// A GeoPackage geometry that could not be parsed or read.
15    #[error(transparent)]
16    Geometry(#[from] GeometryError),
17    /// A tile pyramid that does not satisfy the spec's consistency rules.
18    #[error(transparent)]
19    Tile(#[from] TileError),
20    /// An SQL identifier that cannot be safely quoted.
21    #[error("invalid SQL identifier: {0}")]
22    InvalidIdentifier(String),
23}