Salome HOME
23051: [CEA 1470] SMESH NetGen - Local refinement not computed and dumped properly
[plugins/netgenplugin.git] / src / NETGENPlugin / NETGENPlugin_Hypothesis_i.cxx
index 5055b00e5a0d0ef2cb4ee58ae976d95252b2be4b..2da2e821abcc68d5fb726d3013b2a6b6a858cff8 100644 (file)
@@ -311,9 +311,13 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerRadius()
 
 void NETGENPlugin_Hypothesis_i::SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj,
                                                     CORBA::Double         localSize)
+  throw (SALOME::SALOME_Exception)
 {
   string entry;
   entry = GeomObj->GetStudyEntry();
+  if ( entry.empty() )
+    THROW_SALOME_CORBA_EXCEPTION( "SetLocalSizeOnShape(), shape is not published in study!",
+                                  SALOME::BAD_PARAM );
   SetLocalSizeOnEntry(entry.c_str(), localSize);
 }