OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 36 of file Types.h.

Constructor & Destructor Documentation

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

Definition at line 38 of file Types.h.

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

Definition at line 41 of file Types.h.

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

Member Function Documentation

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

Definition at line 118 of file Types.cpp.

References to_string().

118  {
119  switch (ogr_err) {
120  case OGRERR_NOT_ENOUGH_DATA:
121  return std::string("not enough input data");
122  case OGRERR_NOT_ENOUGH_MEMORY:
123  return std::string("not enough memory");
124  case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
125  return std::string("unsupported geometry type");
126  case OGRERR_UNSUPPORTED_OPERATION:
127  return std::string("unsupported operation");
128  case OGRERR_CORRUPT_DATA:
129  return std::string("corrupt input data");
130  case OGRERR_FAILURE:
131  return std::string("ogr failure");
132  case OGRERR_UNSUPPORTED_SRS:
133  return std::string("unsupported spatial reference system");
134  case OGRERR_INVALID_HANDLE:
135  return std::string("invalid file handle");
136 #if (GDAL_VERSION_MAJOR > 1)
137  case OGRERR_NON_EXISTING_FEATURE:
138  return std::string("feature does not exist in input geometry");
139 #endif
140  default:
141  return std::string("Unknown OGOR error encountered: ") + std::to_string(ogr_err);
142  }
143 }
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: