]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
fight warnings c++17 error throw(). Build KERNEL finished
authorSALOME <salome@opencascade.com>
Tue, 18 Aug 2020 14:32:19 +0000 (17:32 +0300)
committerSALOME <salome@opencascade.com>
Tue, 18 Aug 2020 14:32:19 +0000 (17:32 +0300)
src/Container/SALOME_ContainerManager.cxx
src/DSC/DSC_User/DSC_Exception.hxx
src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx
src/DSC/DSC_User/Superv_Component_i.hxx
src/DSC/DSC_User/test_DSC_Exception.cxx
src/Launcher_SWIG/CMakeLists.txt
src/Registry/RegistryConnexion.cxx
src/SALOMEDS/SALOMEDS_Client.cxx

index 68de29edc2d88610e0f7b03c2f739dfce77c6f41..6658042559a522af4293f26d44dd244dc34781c0 100644 (file)
@@ -368,7 +368,7 @@ Engines::Container_ptr SALOME_ContainerManager::GiveContainer(const Engines::Con
             break;
           }
       }
-      catch(const SALOME_Exception & /*ex*/) //!< TODO: unused variable
+      catch(const SALOME_Exception & ex) //!< TODO: unused variable
       {
         MESSAGE("[GiveContainer] Exception in ResourceManager find !: " << ex.what());
         return ret;
index d70dca939660c38203fb759796783ca569661a96..15a55778fafdf2cfe3d80c80d34cb0336d224230 100644 (file)
@@ -130,7 +130,7 @@ struct DSC_Exception : public SALOME_Exception {
     _what = oss;
   }
 
-  virtual const char* what( void ) const 
+  virtual const char* what( void ) const noexcept 
   {
     return _what.c_str()  ;
   }
index 5f960e244ff5df5a3cc5acbd6cff9604e76b2a12..16c25ba8f2adbc9b4999b5e122e2ab36446d7c04 100644 (file)
     }                                                                   \
                                                                         \
     virtual void set_property(const char * name, const CORBA::Any& value) \
-      throw (Ports::NotDefined, Ports::BadType, Ports::BadValue);       \
+      ;                                                                        \
                                                                         \
     virtual CORBA::Any* get_property(const char* name)                  \
-      throw (Ports::NotDefined);                                        \
+      ;                                                                        \
                                                                         \
     virtual void provides_port_changed(int connection_nbr,              \
                                        const Engines::DSC::Message message) { \
   specificPortName::~specificPortName(void) {};                         \
                                                                         \
   void specificPortName::set_property(const char * name,  const CORBA::Any& value) \
-    throw (Ports::NotDefined, Ports::BadType, Ports::BadValue) {        \
+     {                                                                 \
                                                                         \
     const std::string key(name);                                        \
     CORBA::Long sl;                                                     \
                                                                         \
                                                                         \
   CORBA::Any* specificPortName::get_property(const char* name)          \
-    throw (Ports::NotDefined) {                                         \
+     {                                                                 \
     const std::string key(name);                                        \
     CORBA::Any* value=new CORBA::Any;                                   \
     if (key == "StorageLevel"    )                                      \
index fd8aae2c41724057d6729e1c90e4b7d398ba4ca9..43972c6705605819bb8bf50f16453d019e79679e 100644 (file)
@@ -363,7 +363,7 @@ Superv_Component_i::add_port(const char * port_fab_type,
 
 template <typename SpecificPortType > SpecificPortType * 
 Superv_Component_i::get_port( const char * port_name)
-  throw (PortNotDefined, PortNotConnected, BadCast, UnexpectedState)
+  
 {
   assert(port_name);
     
index f11d1361bcfd410f1c8a3304d1ce832682df7caf..340bc37fa13299677049746cec10a8ba7640cff5 100644 (file)
@@ -36,19 +36,19 @@ public:
   A() {};
   virtual ~A() {};
   // La salome exception ne permet pas de passer une chaine ""
-  void lanceException1_1() throw(Exp1) { throw Exp1("_");}
-  void lanceException1_2() throw(Exp1) { throw Exp1("Ceci est l'exception 1_2");}
-  void lanceException1_3() throw(Exp1) { throw Exp1(LOC("Ceci est l'exception 1_3"));}
-  void lanceException1_4() throw(Exp1) { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_4" )); }
-  void lanceException1_5() throw(Exp1) 
+  void lanceException1_1() { throw Exp1("_");}
+  void lanceException1_2() { throw Exp1("Ceci est l'exception 1_2");}
+  void lanceException1_3() { throw Exp1(LOC("Ceci est l'exception 1_3"));}
+  void lanceException1_4() { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_4" )); }
+  void lanceException1_5() { 
     int a=1;
     throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_5 avec la valeur A : " << a )); }
-  void lanceException1_6() throw(Exp1) {
+  void lanceException1_6() {
     Exp1 exp1(LOC(OSS() << "Ceci est l'exeption 1_6"));
     std::cout << "Affichage de exp1.what() dans lanceException1_6() " << exp1.what() << std::endl;
     throw Exp1(exp1); 
   }
-  void lanceException1_7() throw(Exp1) {
+  void lanceException1_7() {
     throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_7"));
    }
 };
index a98274e97bd9233a66a171e1b46c134c0f9f9ae7..92064ec7c2bc238ba91827dccbf4d177bf7b87ed 100644 (file)
@@ -35,6 +35,7 @@ SET_SOURCE_FILES_PROPERTIES(Launcher.i PROPERTIES SWIG_FLAGS "-py3")
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
   ${LIBBATCH_INCLUDE_DIRS}
+  ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
   ${CMAKE_CURRENT_SOURCE_DIR}/../Launcher
   )
index a5cf3dc077fda1141edd0a46545493c389da7b06..4760d5a9b67efb5483f2a9e17396c7c24728403d 100644 (file)
@@ -40,7 +40,7 @@ extern "C"
 # include <stdio.h>
 }
 
-Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName ) throw( CommException )
+Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName )
 {
         Registry::Components_var varComponents = 0 ;
         ASSERT(ptrSessionName) ;
@@ -119,7 +119,7 @@ void RegistryConnexion::add( const char *aName )
                 infos.pid        = lesInfos.pid() ;
                 infos.machine        = CORBA::string_dup( lesInfos.host_char() ) ;
                 infos.adip        = CORBA::string_dup( lesInfos.adip() ) ;
-                infos.uid        = /*(long)*/(CORBA::Long)((LONG_PTR)lesInfos.uid()) ; //!< TODO: pointer truncation from const PSID to long
+                infos.uid        = /*(long)*/(CORBA::Long)lesInfos.uid() ; //!< TODO: pointer truncation from const PSID to long
                 infos.pwname        = CORBA::string_dup( lesInfos.pwname() ) ;
                 infos.tc_start        = (CORBA::Long)lesInfos.start() ; //!< TODO: conversation from const time_t to CORBA::Long
                 infos.tc_hello        = 0 ;
index 89c415e2fe60149e8484d3210c238ee8a504b4fa..12810eded563a991ea2756b5cec84253315cbe99 100644 (file)
@@ -279,7 +279,7 @@ int main(int argc, char** argv)
   catch(CORBA::Exception&) {
     MESSAGE( "Caught CORBA::Exception." )
   }
-  catch(omniORB::fatalException& /*fe*/) { //!< TODO: unused variable
+  catch(omniORB::fatalException& fe) { //!< TODO: unused variable
     MESSAGE( "Caught omniORB::fatalException:" )
     MESSAGE( "  file: " << fe.file() )
     MESSAGE( "  line: " << fe.line() )