From 920a240bd080aa52b7bcef6ba524f1908e279a49 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Wed, 5 Oct 2016 14:40:41 +1000 Subject: [PATCH] Gmt module. Error reporting in GMT_Type template. --- modules/gmt/modgmt_func.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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