OmniSciDB  c07336695a
Geo_namespace::GeoTypesError Class Reference

#include <geo_types.h>

+ Inheritance diagram for Geo_namespace::GeoTypesError:
+ Collaboration diagram for Geo_namespace::GeoTypesError:

Public Member Functions

 GeoTypesError (const std::string &type, const int ogr_err)
 
 GeoTypesError (const std::string &type, const std::string &err)
 

Static Private Member Functions

static std::string OGRErrorToStr (const int ogr_err)
 

Detailed Description

Definition at line 31 of file geo_types.h.

Constructor & Destructor Documentation

◆ GeoTypesError() [1/2]

Geo_namespace::GeoTypesError::GeoTypesError ( const std::string &  type,
const int  ogr_err 
)
inlineexplicit

Definition at line 33 of file geo_types.h.

34  : std::runtime_error("Geo" + type +
35  " Error: " + GeoTypesError::OGRErrorToStr(ogr_err)) {}
static std::string OGRErrorToStr(const int ogr_err)
Definition: geo_types.cpp:111

◆ GeoTypesError() [2/2]

Geo_namespace::GeoTypesError::GeoTypesError ( const std::string &  type,
const std::string &  err 
)
inlineexplicit

Definition at line 36 of file geo_types.h.

References OGRErrorToStr().

37  : std::runtime_error("Geo" + type + " Error: " + err) {}
+ Here is the call graph for this function:

Member Function Documentation

◆ OGRErrorToStr()

std::string Geo_namespace::GeoTypesError::OGRErrorToStr ( const int  ogr_err)
staticprivate

Definition at line 111 of file geo_types.cpp.

References to_string().

Referenced by GeoTypesError().

111  {
112  switch (ogr_err) {
113  case OGRERR_NOT_ENOUGH_DATA:
114  return std::string("not enough input data");
115  case OGRERR_NOT_ENOUGH_MEMORY:
116  return std::string("not enough memory");
117  case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
118  return std::string("unsupported geometry type");
119  case OGRERR_UNSUPPORTED_OPERATION:
120  return std::string("unsupported operation");
121  case OGRERR_CORRUPT_DATA:
122  return std::string("corrupt input data");
123  case OGRERR_FAILURE:
124  return std::string("ogr failure");
125  case OGRERR_UNSUPPORTED_SRS:
126  return std::string("unsupported spatial reference system");
127  case OGRERR_INVALID_HANDLE:
128  return std::string("invalid file handle");
129 #if (GDAL_VERSION_MAJOR > 1)
130  case OGRERR_NON_EXISTING_FEATURE:
131  return std::string("feature does not exist in input geometry");
132 #endif
133  default:
134  return std::string("Unknown OGOR error encountered: ") + std::to_string(ogr_err);
135  }
136 }
std::string to_string(char const *&&v)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: