def check_minus_one(result, func, cargs):
 if (result == (-1)):
  raise GEOSException(('Error encountered in GEOS C function "%s".' % func.__name__))
 else:
  return result

def check_minus_one ( result , func , cargs ) : if ( result == ( - 1 ) ) : raise GEOSException ( ( 'Error encountered in GEOS C function "%s".' % func . __name__ ) ) else : return result
error checking on routines that should not return -1 .