[MOAB-dev] r3584 - MOAB/trunk/itaps/imesh
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Wed Mar 10 16:21:01 CST 2010
Author: tautges
Date: 2010-03-10 16:21:01 -0600 (Wed, 10 Mar 2010)
New Revision: 3584
Modified:
MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
Log:
Fixing an error with error return values, where MOAB-based error codes
weren't being mapped properly to iBase error codes being passed to
ERROR macro.
Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2010-03-10 19:50:55 UTC (rev 3583)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2010-03-10 22:21:01 UTC (rev 3584)
@@ -645,7 +645,7 @@
if (MB_SUCCESS != result) {
if (allocated_array)
free(array);
- ERROR(result, "iMesh_getEntArrAdj: trouble getting adjacency list.");
+ ERROR(iBase_ERROR_MAP[result], "iMesh_getEntArrAdj: trouble getting adjacency list.");
}
}
else if (iBase_ALL_TYPES == entity_type_requested) {
@@ -657,7 +657,7 @@
if (MB_SUCCESS != result) {
if (allocated_array)
free(array);
- ERROR(result, "iMesh_getEntArrAdj: trouble getting adjacency list.");
+ ERROR(iBase_ERROR_MAP[result], "iMesh_getEntArrAdj: trouble getting adjacency list.");
}
}
connect = &adj_ents[0];
@@ -670,7 +670,7 @@
if (MB_SUCCESS != result) {
if (allocated_array)
free(array);
- ERROR(result, "iMesh_getEntArrAdj: trouble getting adjacency list.");
+ ERROR(iBase_ERROR_MAP[result], "iMesh_getEntArrAdj: trouble getting adjacency list.");
}
connect = &adj_ents[0];
num_connect = adj_ents.size();
@@ -1408,7 +1408,7 @@
msg += "Failed to create tag with name: \"";
msg += tag_name;
msg += "\".";
- ERROR(result,msg.c_str());
+ ERROR(iBase_ERROR_MAP[result],msg.c_str());
}
*tag_handle = (iBase_TagHandle) new_tag;
@@ -1445,7 +1445,7 @@
// ok, good to go - either forced or no entities with this tag
MBErrorCode result = MBI->tag_delete(TAG_HANDLE(tag_handle));
if (MB_SUCCESS != result && MB_TAG_NOT_FOUND != result)
- ERROR(result, "iMesh_destroyTag: problem deleting tag.");
+ ERROR(iBase_ERROR_MAP[result], "iMesh_destroyTag: problem deleting tag.");
RETURN(iBase_ERROR_MAP[result]);
}
@@ -1525,7 +1525,7 @@
std::string msg("iMesh_getTagHandle: problem getting handle for tag named '");
msg += std::string(tag_name) + std::string("'");
*tag_handle = 0;
- ERROR(result, msg.c_str());
+ ERROR(iBase_ERROR_MAP[result], msg.c_str());
}
RETURN(iBase_SUCCESS);
@@ -1780,7 +1780,7 @@
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");
- ERROR(result, msg);
+ ERROR(iBase_ERROR_MAP[result], msg);
}
if (0 == entity_handles_size) {
@@ -1805,7 +1805,7 @@
message += name;
message += "\".";
}
- ERROR(result, message.c_str());
+ ERROR(iBase_ERROR_MAP[result], message.c_str());
}
KEEP_ARRAY(tag_values);
More information about the moab-dev
mailing list