geojson_tile_renderer/
error.rs

1/// Errors that can occur during tile rendering
2#[derive(Debug, thiserror::Error)]
3pub enum RenderError {
4	/// Invalid coordinate value (NaN, infinite, or out of valid range)
5	#[error("Invalid coordinate: {0}")]
6	InvalidCoordinate(String),
7
8	/// Unsupported GeoJSON geometry type
9	#[error("Unsupported geometry type: {0}")]
10	UnsupportedGeometry(String),
11
12	/// Failed to perform geometric operation (e.g., polygon intersection)
13	#[error("Geometry operation failed: {0}")]
14	GeometryOperation(String),
15
16	/// SVG generation error
17	#[error("SVG generation error: {0}")]
18	SvgGeneration(String),
19
20	/// Image rendering error
21	#[error("Image rendering error: {0}")]
22	ImageRendering(String),
23
24	/// Invalid settings or configuration
25	#[error("Invalid settings: {0}")]
26	InvalidSettings(String),
27
28	/// GeoJSON parsing error
29	#[error("GeoJSON parsing error: {0}")]
30	GeoJsonParse(#[from] geojson::Error),
31}
32
33/// Type alias for Results that can return a RenderError
34pub type Result<T> = std::result::Result<T, RenderError>;