Salome HOME
22109: EDF 2552 SMESH/BLSURFPLUGIN: Mesh doesn't compute anymore V7_6_0a1
authoreap <eap@opencascade.com>
Tue, 31 Mar 2015 16:21:15 +0000 (19:21 +0300)
committereap <eap@opencascade.com>
Tue, 31 Mar 2015 16:21:15 +0000 (19:21 +0300)
 Make IDL and C++ exceptions correspond

idl/BLSURFPlugin_Algorithm.idl
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx

index da434e814be10859917db20b44512404703809a6..49925939e097678117a64a48984c731e98d15ef6 100644 (file)
@@ -318,13 +318,13 @@ module BLSURFPlugin
      * Set option values each in the form "option_name[:option_value]".
      * Note: the method is mostly for interaction with GUI.
      */
-    void SetOptionValues(in string_array options);
-    void SetPreCADOptionValues(in string_array options);
+    void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
+    void SetPreCADOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
 
     /*!
      * SizeMap
      */
-    void SetSizeMapEntries(in string_array sizeMaps);
+    void SetSizeMapEntries(in string_array sizeMaps) raises (SALOME::SALOME_Exception);
     void ClearSizeMaps();
 
     void UnsetEntry(in string entry);
@@ -332,16 +332,16 @@ module BLSURFPlugin
     /*!
      * Set/unset a SizeMap on geom object
      */
-    void         SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
+    void         SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap) raises (SALOME::SALOME_Exception);
     void         SetConstantSizeMap(in GEOM::GEOM_Object GeomObj, in double sizeMap);
     void         UnsetSizeMap(in GEOM::GEOM_Object GeomObj);
     
     /*!
      * Set a SizeMap on geom object given by entry
      */
-    void         SetSizeMapEntry(in string entry, in string sizeMap);
-    void         SetConstantSizeMapEntry(in string entry, in GEOM::shape_type shapeType, in double sizeMap);
-    string       GetSizeMapEntry(in string entry);
+    void         SetSizeMapEntry(in string entry, in string sizeMap) raises (SALOME::SALOME_Exception);
+    void         SetConstantSizeMapEntry(in string entry, in GEOM::shape_type shapeType, in double sizeMap) raises (SALOME::SALOME_Exception);
+    string       GetSizeMapEntry(in string entry) raises (SALOME::SALOME_Exception);
     string_array GetSizeMapEntries();
 
     /*!
@@ -353,8 +353,8 @@ module BLSURFPlugin
     /*!
      * Set an attractor on geom object given by entry
      */
-    void         SetAttractorEntry(in string entry, in string attractor);
-    string       GetAttractorEntry(in string entry);
+    void         SetAttractorEntry(in string entry, in string attractor) raises (SALOME::SALOME_Exception);
+    string       GetAttractorEntry(in string entry) raises (SALOME::SALOME_Exception);
     string_array GetAttractorEntries();
 
     /*!
@@ -367,7 +367,7 @@ module BLSURFPlugin
     /*!
      * Set an attractor given by entry on a geom object given by entry
      */
-    void         SetClassAttractorEntry(in string entry, in string att_entry, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius );
+    void         SetClassAttractorEntry(in string entry, in string att_entry, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius ) raises (SALOME::SALOME_Exception);
     BLSURFPlugin::TAttParamsMap GetAttractorParams();
 
 /*
index 1c3841a2c0dec161691ecd80a336b67b121f1ba8..ddab6b55ed477a4109ccd18680402e1d623fa388 100644 (file)
@@ -889,6 +889,8 @@ void BLSURFPlugin_Hypothesis_i::SetSizeMapEntry(const char* entry, const char* s
     throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
   MESSAGE("ENGINE : SETSIZEMAP START ENTRY : " << entry);
+  if ( !entry || !entry[0] )
+    THROW_SALOME_CORBA_EXCEPTION( "SetSizeMapEntry(): empty geom entry", SALOME::BAD_PARAM );
   bool valueChanged = false;
   try {
     valueChanged = (this->GetImpl()->GetSizeMapEntry(entry) != sizeMap);
@@ -1176,7 +1178,9 @@ void BLSURFPlugin_Hypothesis_i::ClearSizeMaps() {
 
 //=============================================================================
 
-void BLSURFPlugin_Hypothesis_i::SetSizeMap(const GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap) {
+void BLSURFPlugin_Hypothesis_i::SetSizeMap(const GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap)
+  throw (SALOME::SALOME_Exception)
+{
   ASSERT(myBaseImpl);
   string entry;
   entry = GeomObj->GetStudyEntry();
index a69d6f76a9425e55bcf67f4b36571196295ac42a..5b7b3c8a286e75ef73a82618ec4e741d71ba5597 100644 (file)
@@ -143,7 +143,7 @@ public:
 
   void SetSizeMapEntries(const BLSURFPlugin::string_array& sizeMaps) throw (SALOME::SALOME_Exception);
 
-  void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
+  void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap) throw (SALOME::SALOME_Exception);
 
   void SetConstantSizeMap(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double sizeMap);