def check_geom(result, func, cargs):
    if not result: 
        raise GEOSException('Error encountered checking Geometry returned from GEOS C function "%s".' % func.__name__)
    return result
Error checking on routines that return Geometries.
dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/gis/geos/prototypes/errcheck.py/check_geom