I don't think we want to continue on returned exception here, do we?
i.e., instead:

```c++
// ignore invalid geometries (e.g. polygons with self-intersecting rings)
int geomvalid = GEOSisValid( geom ); // 0=invalid, 1=valid, 2=exception
if ( geomvalid == 2 || ( ignoreInvalidGeometries && geomvalid == 0 ) )
{
  std::cerr << "ignoring invalid feature " << geom_id << std::endl;
  continue;
}
```