diff --git a/modules/gmt/modgmt_func.h b/modules/gmt/modgmt_func.h index a69a46e..8c18e3b 100644 --- a/modules/gmt/modgmt_func.h +++ b/modules/gmt/modgmt_func.h @@ -1037,14 +1037,16 @@ class Convert2Struct } }; + // Template for generating GMTObject from ObjectList template const ObjectBase* GMT_Type(const ObjectList* input) { bool suc=true; - Struct s=Convert2Struct()(input,&suc); + std::string err; + Struct s=Convert2Struct()(input,&suc,err); if(suc) return new ObjectGMTClass(s); - else return 0; + else return new ObjectError("GMT function",err); } // Shift position of layer