X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MEDSupport_i.cxx;h=7b5289ebb879212e6acc7a12e24b70b7bcb84f7c;hb=d9cc1f52dd4ec81095a093109ee321a29aa90374;hp=ba72f1973327f0343c7b216bf55a2c404d4e4e59;hpb=faa1c8f2bc27c5244a34fe03584826de59cb17b3;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_MEDSupport_i.cxx b/src/SMESH_I/SMESH_MEDSupport_i.cxx index ba72f1973..7b5289ebb 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.cxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.cxx @@ -28,6 +28,7 @@ using namespace std; #include "SMESH_MEDSupport_i.hxx" #include "utilities.h" #include "Utils_CorbaException.hxx" +#include "Utils_ExceptHandlers.hxx" #include #include "SMESHDS_Mesh.hxx" @@ -36,6 +37,7 @@ using namespace std; #include "SMESH_Mesh_i.hxx" #include "SMESH_subMesh_i.hxx" + //============================================================================= /*! * Default constructor @@ -296,6 +298,7 @@ CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED:: SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { + Unexpect aCatch(SALOME_SalomeException); if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Support", SALOME::INTERNAL_ERROR); @@ -309,13 +312,12 @@ SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( int i = 0; myseq->length(_subMeshDS->NbNodes()); - SMDS_Iterator * it = _subMeshDS->GetNodes(); + SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes(); while(it->more()) { myseq[i] = it->next()->GetID(); i++; }; - delete it; SCRUTE(myseq->length()); MESSAGE("End of SMESH_MEDSupport_i::getNumber");