Exemplo n.º 1
0
def basic_test_7():
    old_use_exceptions_status = gdal.GetUseExceptions()
    gdal.UseExceptions()
    ret = basic_test_7_internal()
    if old_use_exceptions_status == 0:
        gdal.DontUseExceptions()
    return ret
Exemplo n.º 2
0
def setGdalException(e=True):
    old = gdal.GetUseExceptions()
    if e:
        gdal.PushErrorHandler(GdalErrorHandler().handler)
        gdal.UseExceptions()
    else:
        gdal.DontUseExceptions()
        gdal.PopErrorHandler()
    return old == 1
Exemplo n.º 3
0
def _RaiseException():
    if gdal.GetUseExceptions():
        _StoreLastException()
        raise RuntimeError(gdal.GetLastErrorMsg())