*/
//================================================================================
-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__
{
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 );
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 );