exception handling for geospatial queries