From bf38d9a415753f44bcd5e3735296c62835bf3b4e Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 15 Jun 2023 16:35:06 +0200 Subject: [PATCH] provide some more info in GEOS errors on geojson load --- .../src/geojson/globegeometryfeature.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/globebrowsing/src/geojson/globegeometryfeature.cpp b/modules/globebrowsing/src/geojson/globegeometryfeature.cpp index c41f17d626..74c699b874 100644 --- a/modules/globebrowsing/src/geojson/globegeometryfeature.cpp +++ b/modules/globebrowsing/src/geojson/globegeometryfeature.cpp @@ -231,13 +231,20 @@ void GlobeGeometryFeature::createFromSingleGeosGeometry(const geos::geom::Geomet _type = GeometryType::Polygon; } - catch (geos::util::IllegalStateException&) { - LERROR("Non-simple (e.g. self-intersecting) polygons not supported yet"); + catch (geos::util::IllegalStateException& e) { + LERROR(fmt::format( + "Non-simple (e.g. self-intersecting) polygons not supported yet. " + "GEOS error: '{}'", e.what() + )); throw ghoul::MissingCaseException(); // TODO: handle self-intersections points // https://www.sciencedirect.com/science/article/pii/S0304397520304199 } + catch (geos::util::GEOSException& e) { + LERROR(fmt::format("Unknown geos error: {}", e.what())); + throw ghoul::MissingCaseException(); + } break; } default: