Browse Source

Gmt module. Error reporting in GMT_Type template.

gmtdatadir
Michael Uleysky 8 years ago
parent
commit
920a240bd0
  1. 6
      modules/gmt/modgmt_func.h

6
modules/gmt/modgmt_func.h

@ -1037,14 +1037,16 @@ class Convert2Struct<struct gmt_font, ObjectList>
} }
}; };
// Template for generating GMTObject from ObjectList // Template for generating GMTObject from ObjectList
template<class Struct> template<class Struct>
const ObjectBase* GMT_Type(const ObjectList* input) const ObjectBase* GMT_Type(const ObjectList* input)
{ {
bool suc=true; bool suc=true;
Struct s=Convert2Struct<Struct,ObjectList>()(input,&suc); std::string err;
Struct s=Convert2Struct<Struct,ObjectList>()(input,&suc,err);
if(suc) return new ObjectGMTClass<Struct>(s); if(suc) return new ObjectGMTClass<Struct>(s);
else return 0; else return new ObjectError("GMT function",err);
} }
// Shift position of layer // Shift position of layer

Loading…
Cancel
Save