PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ogrErrorHandler()

static void ogrErrorHandler ( CPLErr  eErrClass,
int  err_no,
const char *  msg 
)
static

Definition at line 1119 of file rtpg_gdal.c.

1120 {
1121  const char* gdalErrType = "unknown type";
1122  if (err_no >= 0 && err_no < gdalErrorTypesSize)
1123  {
1124  gdalErrType = gdalErrorTypes[err_no];
1125  }
1126  switch (eErrClass)
1127  {
1128  case CE_None:
1129  elog(NOTICE, "GDAL %s [%d] %s", gdalErrType, err_no, msg);
1130  break;
1131  case CE_Debug:
1132  elog(DEBUG2, "GDAL %s [%d] %s", gdalErrType, err_no, msg);
1133  break;
1134  case CE_Warning:
1135  elog(WARNING, "GDAL %s [%d] %s", gdalErrType, err_no, msg);
1136  break;
1137  case CE_Failure:
1138  case CE_Fatal:
1139  default:
1140  elog(ERROR, "GDAL %s [%d] %s", gdalErrType, err_no, msg);
1141  break;
1142  }
1143  return;
1144 }
#define gdalErrorTypesSize
Definition: rtpg_gdal.c:1095
static const char *const gdalErrorTypes[gdalErrorTypesSize]
Definition: rtpg_gdal.c:1097

References gdalErrorTypes, and gdalErrorTypesSize.

Referenced by rtpg_gdal_set_cpl_debug().

Here is the caller graph for this function: