[MOAB-dev] r1798 - in MOAB/trunk: . tools/iMesh

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue May 6 16:49:05 CDT 2008


Author: tautges
Date: 2008-05-06 16:49:04 -0500 (Tue, 06 May 2008)
New Revision: 1798

Modified:
   MOAB/trunk/ReadIDEAS.cpp
   MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
ReadIDEAS.cpp: including another file, gcc4.3 moved some includes around (Brian, this is just because I'm using the latest/experimental version of the compiler, so you wouldn't see this error)

iMesh: adding a patch from Mark Miller, LLNL, which gives more info about failing tag functions

Passes make check.


Modified: MOAB/trunk/ReadIDEAS.cpp
===================================================================
--- MOAB/trunk/ReadIDEAS.cpp	2008-05-06 20:54:34 UTC (rev 1797)
+++ MOAB/trunk/ReadIDEAS.cpp	2008-05-06 21:49:04 UTC (rev 1798)
@@ -1,6 +1,7 @@
 #include <iostream>
 #include <fstream>
 #include <vector>
+#include <cstdlib>
 #include "assert.h"
 
 #include "ReadIDEAS.hpp"

Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2008-05-06 20:54:34 UTC (rev 1797)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2008-05-06 21:49:04 UTC (rev 1798)
@@ -2015,7 +2015,11 @@
   int tag_size;
   MBErrorCode result = MBI->tag_get_size(tag, tag_size);
   if (MB_SUCCESS != result) {
-    iMesh_processError(iBase_ERROR_MAP[result], "iMesh_getArrData: couldn't get tag size.");
+    int nerr=-1; char tagn[64], msg[256];
+    iMesh_getTagName(instance, tag_handle, tagn, &nerr, sizeof(tagn));
+    snprintf(msg, sizeof(msg), "iMesh_getArrData: couldn't get size for tag \"%s\"",
+        nerr==0?tagn:"unknown");
+    iMesh_processError(iBase_ERROR_MAP[result], msg);
     RETURN(iBase_ERROR_MAP[result]);
   }
 
@@ -2030,10 +2034,18 @@
                              *tag_values);
 
   if (MB_SUCCESS != result && MB_TAG_NOT_FOUND != result) {
-    iMesh_processError(iBase_ERROR_MAP[result], "iMesh_getTagData didn't succeed.");
+    int nerr=-1; char tagn[64], msg[256];
+    iMesh_getTagName(instance, tag_handle, tagn, &nerr, sizeof(tagn));
+    snprintf(msg, sizeof(msg), "iMesh_getArrData: didn't succeed for tag \"%s\"",
+        nerr==0?tagn:"unknown");
+    iMesh_processError(iBase_ERROR_MAP[result], msg);
   }
   else if (MB_TAG_NOT_FOUND == result) {
-    iMesh_processError(iBase_ERROR_MAP[result], "iMesh_getTagData: tag not found.");
+    int nerr=-1; char tagn[64], msg[256];
+    iMesh_getTagName(instance, tag_handle, tagn, &nerr, sizeof(tagn));
+    snprintf(msg, sizeof(msg), "iMesh_getArrData: tag \"%s\" not found",
+        nerr==0?tagn:"unknown");
+    iMesh_processError(iBase_ERROR_MAP[result], msg);
   }
 
   if (MB_SUCCESS == result)




More information about the moab-dev mailing list