use thiserror::Error;
use crate::TileId;
#[derive(Debug, Clone, PartialEq, Eq, Error)]
#[non_exhaustive]
pub enum TileError {
#[error("extent must be between 1 and {} minus the buffer", i32::MAX)]
InvalidExtent,
#[error("buffer must be strictly less than half the extent")]
BufferTooLarge,
#[error(
"geometry too large: at most {} rings or edges are supported",
u32::MAX
)]
GeometryTooLarge,
#[error("coordinate arithmetic overflowed the i32 range")]
Overflow,
#[error("tile conflicts with {} already-added tile(s)", .0.len())]
Conflict(Vec<TileId>),
}