OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Geospatial::GeoTypesError Class Reference

#include <Types.h>

+ Inheritance diagram for Geospatial::GeoTypesError:
+ Collaboration diagram for Geospatial::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 30 of file Types.h.

Constructor & Destructor Documentation

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

Definition at line 32 of file Types.h.

33  : std::runtime_error("Geo" + type +
34  " Error: " + GeoTypesError::OGRErrorToStr(ogr_err)) {}
static std::string OGRErrorToStr(const int ogr_err)
Definition: Types.cpp:112
Geospatial::GeoTypesError::GeoTypesError ( const std::string &  type,
const std::string &  err 
)
inlineexplicit

Definition at line 35 of file Types.h.

36  : std::runtime_error("Geo" + type + " Error: " + err) {}

Member Function Documentation

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

Definition at line 112 of file Types.cpp.

References to_string().

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

+ Here is the call graph for this function:


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