[MOAB-dev] r3229 - MOAB/trunk/tools/iMesh

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Oct 20 08:47:04 CDT 2009


Author: kraftche
Date: 2009-10-20 08:47:04 -0500 (Tue, 20 Oct 2009)
New Revision: 3229

Modified:
   MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
Fix code that assumes iMesh_processError will update the local *err.
Most of the code does not make that assumption, and removing it entirely
allows iMesh_processError to be a function rather than a macro.  

Fixes failing test.



Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2009-10-20 02:00:20 UTC (rev 3228)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2009-10-20 13:47:04 UTC (rev 3229)
@@ -1728,7 +1728,7 @@
       msg += std::string(tag_name) + std::string("'");
       iMesh_processError(iBase_ERROR_MAP[result], msg.c_str());
       *tag_handle = 0;
-      return;
+      RETURN(iBase_ERROR_MAP[result]);
     }
 
     iMesh_LAST_ERROR.error_type = iBase_SUCCESS;
@@ -2889,7 +2889,8 @@
     std::string msg("MBMesh::tag_set_vertices: getting entities didn't succeed., with error type: ");
     msg += MBI->get_error_string(result);
     iMesh_processError(iBase_ERROR_MAP[result], msg.c_str());
-    return result;
+    *err = iBase_ERROR_MAP[result];
+    return MB_FAILURE;
   }
 
     // remove any sets
@@ -2903,6 +2904,7 @@
     std::string msg("MBMesh::tag_set_vertices: getting vertices didn't succeed., with error type: ");
     msg += MBI->get_error_string(result);
     iMesh_processError(iBase_ERROR_MAP[result], msg.c_str());
+    *err = iBase_ERROR_MAP[result];
     return result;
   }
   
@@ -2914,6 +2916,7 @@
       std::string msg("MBMesh::tag_set_vertices: couldn't make tag., with error type: ");
       msg += MBI->get_error_string(result);
       iMesh_processError(iBase_ERROR_MAP[result], msg.c_str());
+      *err = iBase_ERROR_MAP[result];
       return result;
     }
   }
@@ -2925,6 +2928,7 @@
       std::string msg("MBMesh::tag_set_vertices: couldn't set pos_tag., with error type: ");
       msg += MBI->get_error_string(result);
       iMesh_processError(iBase_ERROR_MAP[result], msg.c_str());
+      *err = iBase_ERROR_MAP[result];
       return result;
     }
   }



More information about the moab-dev mailing list