X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_Mesh.cxx;h=f2aee846a6efbc854b55b3f766e3cdafa4c8d689;hb=cb55604f37e3d2583272fd436bb6557b041948b5;hp=a5af798e57899f7806fa9d0f594bbea1a6c9e927;hpb=0fc0831670e27a5611b941c52dc152fd63964515;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index a5af798e5..f2aee846a 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -68,7 +68,7 @@ int SMDS_Mesh::chunkSize = 1024; */ //================================================================================ -int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc) +int SMDS_Mesh::CheckMemory(const bool doNotRaise) { return -1; #if !defined WIN32 && !defined __APPLE__ @@ -831,6 +831,8 @@ SMDS_Mesh::AddPolygonalFaceWithID (const std::vector & nod { if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); + if ( nodes.empty() ) + throw std::invalid_argument("Polygon without nodes is forbidden"); if ( SMDS_MeshCell* cell = myCellFactory->NewCell( ID )) { cell->init( SMDSEntity_Polygon, nodes ); @@ -874,6 +876,8 @@ SMDS_Mesh::AddQuadPolygonalFaceWithID (const std::vector & const int ID) { if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); + if ( nodes.empty() ) + throw std::invalid_argument("Polygon without nodes is forbidden"); if ( SMDS_MeshCell* cell = myCellFactory->NewCell( ID )) { cell->init( SMDSEntity_Quad_Polygon, nodes );