error catching for geometry errors