From: Viktor Uzlov Date: Tue, 18 Aug 2020 06:31:24 +0000 (+0300) Subject: fix warning c4290 fix for c++17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d3ae0811a69992729dd67fdc6c90cbb965fbd8a7;p=modules%2Fkernel.git fix warning c4290 fix for c++17 --- diff --git a/src/Communication/SALOME_Comm_i.cxx b/src/Communication/SALOME_Comm_i.cxx index 598802373..141e10156 100644 --- a/src/Communication/SALOME_Comm_i.cxx +++ b/src/Communication/SALOME_Comm_i.cxx @@ -492,7 +492,7 @@ void* SALOME_SocketSender_i::myThread(void *args) return args; } -void SALOME_SocketSender_i::initCom() throw(SALOME::SALOME_Exception) +void SALOME_SocketSender_i::initCom() { struct sockaddr_in serv_addr; socklen_t n; @@ -537,7 +537,7 @@ void SALOME_SocketSender_i::initCom() throw(SALOME::SALOME_Exception) SCRUTE(_port); } -void SALOME_SocketSender_i::acceptCom() throw(SALOME::SALOME_Exception) +void SALOME_SocketSender_i::acceptCom() { socklen_t sin_size; struct sockaddr_in client_addr; diff --git a/src/Communication/SALOME_Comm_i.hxx b/src/Communication/SALOME_Comm_i.hxx index 22fa1e4dc..1e5c31eb1 100644 --- a/src/Communication/SALOME_Comm_i.hxx +++ b/src/Communication/SALOME_Comm_i.hxx @@ -210,8 +210,8 @@ public: ~SALOME_SocketSender_i(); SALOME::SocketSender::param* getParam(); void send(); - void initCom() throw(SALOME::SALOME_Exception); - void acceptCom() throw(SALOME::SALOME_Exception); + void initCom(); + void acceptCom(); void endOfCom(); void closeCom(); private: diff --git a/src/DSC/DSC_User/DSC_Exception.hxx b/src/DSC/DSC_User/DSC_Exception.hxx index 0e49b407f..d70dca939 100644 --- a/src/DSC/DSC_User/DSC_Exception.hxx +++ b/src/DSC/DSC_User/DSC_Exception.hxx @@ -130,7 +130,7 @@ struct DSC_Exception : public SALOME_Exception { _what = oss; } - virtual const char* what( void ) const throw () + virtual const char* what( void ) const { return _what.c_str() ; } @@ -140,7 +140,7 @@ struct DSC_Exception : public SALOME_Exception { // Le destructeur de la SALOME_Exception devrait être virtuel // sinon pb avec nos attributs de type pointeur. - virtual ~DSC_Exception(void) throw() {}; + virtual ~DSC_Exception(void) {}; virtual const std::string & getExceptionName() const {return _exceptionName;}; @@ -170,12 +170,12 @@ protected: ) : DSC_Exception(text,fileName,lineNumber,funcName) { \ _exceptionName = #Derived; \ } \ - virtual ~Derived(void) throw();\ + virtual ~Derived(void);\ };\ //Sert à eviter le problème d'identification RTTI des exceptions //Crée un unique typeInfo pour tous les bibliothèques composants SALOME //dans un fichier cxx -#define DSC_EXCEPTION_CXX(NameSpace,Derived) NameSpace::Derived::~Derived(void) throw() {}; +#define DSC_EXCEPTION_CXX(NameSpace,Derived) NameSpace::Derived::~Derived(void) {}; #endif /* DSC_EXCEPTION_HXX */ diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx index 1deb6f3ef..cb515955a 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumException.hxx @@ -56,7 +56,7 @@ struct CalciumException : public DSC_Exception { DSC_Exception(ex),_info(info),_exceptionName("CalciumException") {}; - virtual ~CalciumException() throw() {}; + virtual ~CalciumException() {}; CalciumTypes::InfoType getInfo() const { return _info;} void setInfo(CalciumTypes::InfoType info) {_info=info;} virtual const std::string & getExceptionName() const {return _exceptionName;}; diff --git a/src/DSC/DSC_User/Superv_Component_i.cxx b/src/DSC/DSC_User/Superv_Component_i.cxx index ff49ad385..0822c66de 100644 --- a/src/DSC/DSC_User/Superv_Component_i.cxx +++ b/src/DSC/DSC_User/Superv_Component_i.cxx @@ -104,7 +104,7 @@ Superv_Component_i::get_factory(const std::string & factory_name) provides_port * Superv_Component_i::create_provides_data_port(const std::string& port_fab_type) - throw (BadFabType) + { provides_port * rtn_port = NULL; std::string factory_name; @@ -129,7 +129,7 @@ Superv_Component_i::create_provides_data_port(const std::string& port_fab_type) uses_port * Superv_Component_i::create_uses_data_port(const std::string& port_fab_type) -throw (BadFabType) + { uses_port * rtn_proxy = NULL; std::string factory_name; @@ -156,7 +156,7 @@ void Superv_Component_i::add_port(const char * port_fab_type, const char * port_type, const char * port_name) - throw (PortAlreadyDefined, BadFabType, BadType, BadProperty) + { assert(port_fab_type); assert(port_type); @@ -186,7 +186,7 @@ Superv_Component_i::add_port(const char * port_fab_type, void Superv_Component_i::add_port(provides_port * port, const char* provides_port_name) - throw (PortAlreadyDefined, NilPort, BadProperty) + { assert(port); assert(provides_port_name); @@ -219,7 +219,7 @@ Superv_Component_i::add_port(provides_port * port, void Superv_Component_i::add_port(uses_port * port, const char* uses_port_name) - throw (PortAlreadyDefined, NilPort, BadProperty) + { assert(port); assert(uses_port_name); @@ -248,7 +248,7 @@ Superv_Component_i::add_port(uses_port * port, void Superv_Component_i::get_port(provides_port *& port, const char * provides_port_name) - throw (PortNotDefined,PortNotConnected) + { assert(provides_port_name); @@ -267,7 +267,7 @@ Superv_Component_i::get_port(provides_port *& port, void Superv_Component_i::get_port(uses_port *& port, const char * uses_port_name) - throw (PortNotDefined, PortNotConnected) + { assert(uses_port_name); diff --git a/src/DSC/DSC_User/Superv_Component_i.hxx b/src/DSC/DSC_User/Superv_Component_i.hxx index 1e49ff311..fd8aae2c4 100644 --- a/src/DSC/DSC_User/Superv_Component_i.hxx +++ b/src/DSC/DSC_User/Superv_Component_i.hxx @@ -118,7 +118,7 @@ public: * \note It's user repsonsability to destroy the provides port. */ virtual provides_port * create_provides_data_port(const std::string& port_fab_type) - throw (BadFabType); + ; /*! @@ -132,7 +132,7 @@ public: * \note It's user repsonsability to destroy the uses port. */ virtual uses_port * create_uses_data_port(const std::string& port_fab_type) - throw (BadFabType); + ; /*! * Adds a port to the component. With this method only Salomé's provided DSC ports @@ -145,7 +145,7 @@ public: virtual void add_port(const char * port_fab_type, const char * port_type, const char * port_name) - throw (PortAlreadyDefined, BadFabType, BadType, BadProperty); + ; /*! * Adds a port to the component. With this method only Salomé's provided DSC ports @@ -160,7 +160,7 @@ public: SpecificPortType * add_port(const char * port_fab_type, const char * port_type, const char * port_name) - throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty); + ; /*! * Adds a created provides port to the component. @@ -170,7 +170,7 @@ public: */ virtual void add_port(provides_port * port, const char* provides_port_name) - throw (PortAlreadyDefined, NilPort, BadProperty); + ; /*! * Adds a created uses port to the component. @@ -180,7 +180,7 @@ public: */ virtual void add_port(uses_port * port, const char* uses_port_name) - throw (PortAlreadyDefined, NilPort, BadProperty); + ; /*! * Gets the provides port already added in the component. @@ -190,7 +190,7 @@ public: */ virtual void get_port(provides_port *& port, const char* provides_port_name) - throw (PortNotDefined, PortNotConnected); + ; /*! * Gets the uses port already added in the component. @@ -200,7 +200,7 @@ public: */ virtual void get_port(uses_port *& port, const char* uses_port_name) - throw (PortNotDefined, PortNotConnected); + ; /*! * Gets the list of the ports of a service. @@ -221,7 +221,7 @@ public: */ template SpecificPortType * get_port( const char * port_name) - throw (PortNotDefined, PortNotConnected, BadCast, UnexpectedState); + ; /*! * \see DSC_Callbacks::provides_port_changed @@ -318,7 +318,7 @@ template < typename SpecificPortType > SpecificPortType * Superv_Component_i::add_port(const char * port_fab_type, const char * port_type, const char * port_name) - throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty) + { assert(port_fab_type); assert(port_type); diff --git a/src/DSC/ParallelDSC/ParallelDSC_i.hxx b/src/DSC/ParallelDSC/ParallelDSC_i.hxx index b5e083065..157facf33 100644 --- a/src/DSC/ParallelDSC/ParallelDSC_i.hxx +++ b/src/DSC/ParallelDSC/ParallelDSC_i.hxx @@ -57,9 +57,7 @@ public: virtual void add_provides_port(Ports::Port_ptr ref, const char* provides_port_name, Ports::PortProperties_ptr port_prop) - throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::NilPort, - Engines::DSC::BadProperty) { + { Engines_DSC_interface::add_provides_port(ref, provides_port_name, port_prop); @@ -71,8 +69,7 @@ public: virtual void add_uses_port(const char* repository_id, const char* uses_port_name, Ports::PortProperties_ptr port_prop) - throw (Engines::DSC::PortAlreadyDefined, - Engines::DSC::BadProperty) { + { Engines_DSC_interface::add_uses_port(repository_id, uses_port_name, port_prop); @@ -83,8 +80,7 @@ public: */ virtual Ports::Port_ptr get_provides_port(const char* provides_port_name, const CORBA::Boolean connection_error) - throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + { return Engines_DSC_interface::get_provides_port(provides_port_name, connection_error); } @@ -93,8 +89,7 @@ public: * \see Engines::DSC::get_uses_port */ virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name) - throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + { return Engines_DSC_interface::get_uses_port(uses_port_name); } @@ -102,7 +97,7 @@ public: * \see Engines::DSC::connect_provides_port */ virtual void connect_provides_port(const char* provides_port_name) - throw (Engines::DSC::PortNotDefined) { + { Engines_DSC_interface::connect_provides_port(provides_port_name); } @@ -111,9 +106,7 @@ public: */ virtual void connect_uses_port(const char* uses_port_name, Ports::Port_ptr provides_port_ref) - throw (Engines::DSC::PortNotDefined, - Engines::DSC::BadPortType, - Engines::DSC::NilPort) { + { Engines_DSC_interface::connect_uses_port(uses_port_name, provides_port_ref); } @@ -122,7 +115,7 @@ public: * \see Engines::DSC::is_connected */ virtual CORBA::Boolean is_connected(const char* port_name) - throw (Engines::DSC::PortNotDefined) { + { return Engines_DSC_interface::is_connected(port_name); } @@ -131,8 +124,7 @@ public: */ virtual void disconnect_provides_port(const char* provides_port_name, const Engines::DSC::Message message) - throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected) { + { Engines_DSC_interface::disconnect_provides_port(provides_port_name, message); } @@ -143,16 +135,14 @@ public: virtual void disconnect_uses_port(const char* uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message) - throw (Engines::DSC::PortNotDefined, - Engines::DSC::PortNotConnected, - Engines::DSC::BadPortReference) { + { Engines_DSC_interface::disconnect_uses_port(uses_port_name, provides_port_ref, message); } virtual Ports::PortProperties_ptr get_port_properties(const char* port_name) - throw (Engines::DSC::PortNotDefined) { + { return Engines_DSC_interface::get_port_properties(port_name); } diff --git a/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.cxx b/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.cxx index 47309bcd4..e2a444396 100644 --- a/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.cxx +++ b/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.cxx @@ -185,7 +185,6 @@ SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, const char* theName) - throw (SALOME::SALOME_Exception) { MESSAGE("-----------------------------------------"); MESSAGE("-----------------------------------------"); diff --git a/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx b/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx index d170057e8..15ea32be2 100644 --- a/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx +++ b/src/KernelHelpers/SALOMEDS_DriverDefaultImpl.hxx @@ -90,8 +90,7 @@ class KERNELHELPERS_EXPORT SALOMEDS_DriverDefaultImpl: virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, - const char* theName) - throw (SALOME::SALOME_Exception); + const char* theName); virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject); diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx index e9d184336..2088c5aff 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx @@ -102,7 +102,6 @@ SALOME_ModuleCatalog_AcomponentImpl::GetInterfaceList() //---------------------------------------------------------------------- SALOME_ModuleCatalog::DefinitionInterface* SALOME_ModuleCatalog_AcomponentImpl::GetInterface(const char* interfacename) - throw(SALOME_ModuleCatalog::NotFound) { if(MYDEBUG) BEGIN_OF("GetInterface"); if(MYDEBUG) SCRUTE(interfacename); @@ -153,7 +152,6 @@ SALOME_ModuleCatalog_AcomponentImpl::GetInterface(const char* interfacename) //---------------------------------------------------------------------- SALOME_ModuleCatalog::ListOfServices* SALOME_ModuleCatalog_AcomponentImpl::GetServiceList(const char* interfacename) - throw(SALOME_ModuleCatalog::NotFound) { if(MYDEBUG) BEGIN_OF("GetServiceList"); if(MYDEBUG) SCRUTE(interfacename); @@ -209,7 +207,6 @@ SALOME_ModuleCatalog_AcomponentImpl::GetServiceList(const char* interfacename) SALOME_ModuleCatalog::Service* SALOME_ModuleCatalog_AcomponentImpl::GetService(const char* interfacename, const char* servicename) - throw(SALOME_ModuleCatalog::NotFound) { if(MYDEBUG) BEGIN_OF("GetService"); if(MYDEBUG) SCRUTE(interfacename); @@ -276,7 +273,6 @@ SALOME_ModuleCatalog_AcomponentImpl::GetService(const char* interfacename, //---------------------------------------------------------------------- SALOME_ModuleCatalog::Service* SALOME_ModuleCatalog_AcomponentImpl::GetDefaultService(const char* interfacename) - throw(SALOME_ModuleCatalog::NotFound) { if(MYDEBUG) BEGIN_OF("GetDefaultService"); if(MYDEBUG) SCRUTE(interfacename); @@ -330,7 +326,6 @@ SALOME_ModuleCatalog_AcomponentImpl::GetDefaultService(const char* interfacename //---------------------------------------------------------------------- char* SALOME_ModuleCatalog_AcomponentImpl::GetPathPrefix(const char* machinename) - throw(SALOME_ModuleCatalog::NotFound) { if(MYDEBUG) BEGIN_OF("GetPathPrefix"); if(MYDEBUG) SCRUTE(machinename); diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx index c3309fdde..676b85f9d 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx @@ -37,7 +37,7 @@ #ifdef WIN32 #pragma warning(disable:4275) // Disable warning interface non dll -#pragma warning(disable:4290) // Warning Exception ... +//#pragma warning(disable:4290) // Warning Exception ... #endif class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent @@ -62,7 +62,7 @@ public: */ virtual SALOME_ModuleCatalog::DefinitionInterface* GetInterface(const char* interfacename) - throw(SALOME_ModuleCatalog::NotFound); + ; //! method to get a list of the services name of an interface of a component /*!If the specified interface doesn't exist, the Notfound exception is thrown @@ -71,7 +71,7 @@ public: */ virtual SALOME_ModuleCatalog::ListOfServices* GetServiceList(const char* interfacename) - throw(SALOME_ModuleCatalog::NotFound); + ; //! method to get one service of an interface of a component @@ -84,7 +84,7 @@ public: virtual SALOME_ModuleCatalog::Service* GetService(const char* interfacename, const char* servicename) - throw(SALOME_ModuleCatalog::NotFound); + ; //! method to get the default service of an interface of a component /*! If the specified interface doesn't exist, the Notfound exception is thrown @@ -93,7 +93,7 @@ public: */ virtual SALOME_ModuleCatalog::Service* GetDefaultService(const char* interfacename) - throw(SALOME_ModuleCatalog::NotFound); + ; //! method to get the PathPrefix of a computer /*! If the wanted computer doesn't exist, the Notfound exception is thrown @@ -101,7 +101,7 @@ public: \return the prefix path */ virtual char* GetPathPrefix(const char* machinename) - throw(SALOME_ModuleCatalog::NotFound); + ; //! method to obtain the constraint affected to a component /*! to be resolved by LifeCycle for the computer choice diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index 071a7954f..8ec505cbd 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -134,7 +134,7 @@ void SALOME_NamingService::init_orb(CORBA::ORB_ptr orb) void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, const char* Path) - throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -329,7 +329,7 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, // ============================================================================ CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path) - throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -413,7 +413,7 @@ CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path) // ============================================================================ CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path) - throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -481,7 +481,7 @@ SALOME_NamingService::ResolveComponent(const char* hostname, const char* containerName, const char* componentName, const int nbproc) - throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -668,7 +668,7 @@ std::string SALOME_NamingService::BuildContainerNameForNS(const Engines::Contain // ============================================================================ int SALOME_NamingService::Find(const char* name) -throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -710,7 +710,7 @@ throw(ServiceUnreachable) */ // ============================================================================ -bool SALOME_NamingService::Create_Directory(const char* Path) throw(ServiceUnreachable) +bool SALOME_NamingService::Create_Directory(const char* Path) { Utils_Locker lock (&_myMutex); @@ -751,7 +751,7 @@ bool SALOME_NamingService::Create_Directory(const char* Path) throw(ServiceUnrea */ // ============================================================================ -bool SALOME_NamingService::Change_Directory(const char* Path) throw(ServiceUnreachable) +bool SALOME_NamingService::Change_Directory(const char* Path) { Utils_Locker lock (&_myMutex); @@ -849,7 +849,7 @@ bool SALOME_NamingService::Change_Directory(const char* Path) throw(ServiceUnrea */ // ============================================================================ -char *SALOME_NamingService::Current_Directory() throw(ServiceUnreachable) +char *SALOME_NamingService::Current_Directory() { Utils_Locker lock (&_myMutex); @@ -899,7 +899,7 @@ char *SALOME_NamingService::Current_Directory() throw(ServiceUnreachable) */ // ============================================================================ -void SALOME_NamingService::list() throw(ServiceUnreachable) +void SALOME_NamingService::list() { Utils_Locker lock (&_myMutex) @@ -959,7 +959,7 @@ void SALOME_NamingService::list() throw(ServiceUnreachable) */ // ============================================================================ -std::vector SALOME_NamingService::list_directory() throw(ServiceUnreachable) +std::vector SALOME_NamingService::list_directory() { Utils_Locker lock (&_myMutex); std::vector dirList ; @@ -1012,7 +1012,7 @@ std::vector SALOME_NamingService::list_directory() throw(ServiceUnr */ // ============================================================================ -std::vector SALOME_NamingService::list_subdirs() throw(ServiceUnreachable) +std::vector SALOME_NamingService::list_subdirs() { Utils_Locker lock (&_myMutex); std::vector dirList ; @@ -1062,7 +1062,7 @@ std::vector SALOME_NamingService::list_subdirs() throw(ServiceUnrea // ============================================================================ std::vector SALOME_NamingService::list_directory_recurs() -throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -1087,7 +1087,7 @@ throw(ServiceUnreachable) // ============================================================================ void SALOME_NamingService::Destroy_Name(const char* Path) -throw(ServiceUnreachable) + { Utils_Locker lock (&_myMutex); @@ -1240,7 +1240,7 @@ throw(ServiceUnreachable) */ // ============================================================================ -void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnreachable) +void SALOME_NamingService::Destroy_Directory(const char* Path) { Utils_Locker lock (&_myMutex); @@ -1408,7 +1408,7 @@ void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnre */ // ============================================================================ -void SALOME_NamingService::Destroy_FullDirectory(const char* Path) throw(ServiceUnreachable) +void SALOME_NamingService::Destroy_FullDirectory(const char* Path) { //no need to lock here because method calls are threadsafe. if( Change_Directory(Path) ) diff --git a/src/NamingService/SALOME_NamingService.hxx b/src/NamingService/SALOME_NamingService.hxx index e8a88fa5a..879c37566 100644 --- a/src/NamingService/SALOME_NamingService.hxx +++ b/src/NamingService/SALOME_NamingService.hxx @@ -41,7 +41,7 @@ #include "SALOME_NamingService_defs.hxx" #ifdef WIN32 -#pragma warning(disable:4290) // Warning Exception ... +//#pragma warning(disable:4290) // Warning Exception ... #endif class NAMINGSERVICE_EXPORT SALOME_NamingService @@ -53,29 +53,29 @@ public: virtual ~SALOME_NamingService(); void init_orb(CORBA::ORB_ptr orb=0); - void Register(CORBA::Object_ptr ObjRef, const char* Path) throw(ServiceUnreachable); - CORBA::Object_ptr Resolve(const char* Path) throw( ServiceUnreachable); - CORBA::Object_ptr ResolveFirst(const char* Path) throw( ServiceUnreachable); + void Register(CORBA::Object_ptr ObjRef, const char* Path) ; + CORBA::Object_ptr Resolve(const char* Path) ; + CORBA::Object_ptr ResolveFirst(const char* Path) ; CORBA::Object_ptr ResolveComponent(const char* hostname, const char* containerName, const char* componentName, - const int nbproc=0) throw(ServiceUnreachable); + const int nbproc=0) ; std::string ContainerName(const char *ContainerName); std::string ContainerName(const Engines::ContainerParameters& params); std::string BuildContainerNameForNS(const char *ContainerName, const char *hostname); std::string BuildContainerNameForNS(const Engines::ContainerParameters& params, const char *hostname); - int Find(const char* name) throw(ServiceUnreachable); - bool Create_Directory(const char* Path) throw(ServiceUnreachable); - bool Change_Directory(const char* Path) throw(ServiceUnreachable); - char* Current_Directory() throw(ServiceUnreachable); - void list() throw(ServiceUnreachable); - std::vector list_directory() throw(ServiceUnreachable); - std::vector list_subdirs() throw(ServiceUnreachable); - std::vector list_directory_recurs() throw(ServiceUnreachable); - void Destroy_Name(const char* Path) throw(ServiceUnreachable); - virtual void Destroy_Directory(const char* Path) throw(ServiceUnreachable); - virtual void Destroy_FullDirectory(const char* Path) throw(ServiceUnreachable); + int Find(const char* name) ; + bool Create_Directory(const char* Path) ; + bool Change_Directory(const char* Path) ; + char* Current_Directory() ; + void list() ; + std::vector list_directory() ; + std::vector list_subdirs() ; + std::vector list_directory_recurs() ; + void Destroy_Name(const char* Path) ; + virtual void Destroy_Directory(const char* Path) ; + virtual void Destroy_FullDirectory(const char* Path) ; char *getIORaddr(); CORBA::ORB_ptr orb(); diff --git a/src/ResourcesManager/ResourcesManager.cxx b/src/ResourcesManager/ResourcesManager.cxx index 45d6e472d..9aff43d40 100644 --- a/src/ResourcesManager/ResourcesManager.cxx +++ b/src/ResourcesManager/ResourcesManager.cxx @@ -97,7 +97,7 @@ ResourcesManager_cpp(const char *xmlFilePath) */ //============================================================================= -ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException) +ResourcesManager_cpp::ResourcesManager_cpp() { RES_MESSAGE("ResourcesManager_cpp constructor"); @@ -199,7 +199,7 @@ ResourcesManager_cpp::~ResourcesManager_cpp() //============================================================================= std::vector -ResourcesManager_cpp::GetFittingResources(const resourceParams& params) throw(ResourcesException) +ResourcesManager_cpp::GetFittingResources(const resourceParams& params) { RES_MESSAGE("[GetFittingResources] on computer " << Kernel_Utils::GetHostname().c_str()); RES_MESSAGE("[GetFittingResources] with resource name: " << params.name); diff --git a/src/ResourcesManager/ResourcesManager.hxx b/src/ResourcesManager/ResourcesManager.hxx index da0797196..94f337041 100644 --- a/src/ResourcesManager/ResourcesManager.hxx +++ b/src/ResourcesManager/ResourcesManager.hxx @@ -40,7 +40,7 @@ #ifdef WIN32 #pragma warning(disable:4251) // Warning DLL Interface ... -#pragma warning(disable:4290) // Warning Exception ... +//#pragma warning(disable:4290) // Warning Exception ... #endif // --- WARNING --- @@ -72,12 +72,12 @@ class RESOURCESMANAGER_EXPORT ResourcesManager_cpp public: ResourcesManager_cpp(const char *xmlFilePath); - ResourcesManager_cpp() throw(ResourcesException); + ResourcesManager_cpp() ; ~ResourcesManager_cpp(); std::vector - GetFittingResources(const resourceParams& params) throw(ResourcesException); + GetFittingResources(const resourceParams& params) ; std::string Find(const std::string& policy, const std::vector& listOfResources) const; diff --git a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx index 5308c9250..61aaea315 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx @@ -36,7 +36,7 @@ */ //============================================================================ SALOMEDS_BasicAttribute_i* BasicAttributeFactory::Create(const char* type) - throw (SALOME_Exception) + { try { if (!strcmp(type,"AttReal")) diff --git a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx index 9b2cf34de..4438da7f9 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.hxx @@ -42,7 +42,7 @@ public: virtual ~BasicAttributeFactory() {}; SALOMEDS_BasicAttribute_i* Create(const char* type) - throw (SALOME_Exception); + ; }; #endif diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index f027c5313..d03d6c9a5 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -392,7 +392,7 @@ PortableServer::POA_ptr SALOMEDS_Study_i::_default_POA() */ //============================================================================ bool SALOMEDS_Study_i::Open(const wchar_t* aWUrl) - throw(SALOME::SALOME_Exception) + { if (!_closed) Clear(); @@ -532,7 +532,7 @@ CORBA::Boolean SALOMEDS_Study_i::CanPaste(SALOMEDS::SObject_ptr theObject) */ //============================================================================ SALOMEDS::SObject_ptr SALOMEDS_Study_i::Paste(SALOMEDS::SObject_ptr theObject) - throw(SALOMEDS::StudyBuilder::LockProtection) + { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index 2bf991061..e92b7c5c9 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -79,7 +79,7 @@ public: \param char* arguments, the study URL \return bool arguments */ - virtual bool Open(const wchar_t* aStudyUrl) throw (SALOME::SALOME_Exception); + virtual bool Open(const wchar_t* aStudyUrl) ; //! method to check that a Study can be opened /*! @@ -107,7 +107,7 @@ public: /*! \param theObject object to paste */ - virtual SALOMEDS::SObject_ptr Paste(SALOMEDS::SObject_ptr theObject) throw(SALOMEDS::StudyBuilder::LockProtection); + virtual SALOMEDS::SObject_ptr Paste(SALOMEDS::SObject_ptr theObject) ; virtual CORBA::Boolean CanPaste(SALOMEDS::SObject_ptr theObject); //! method to Get persistent reference of study (idem URL()) diff --git a/src/SALOMESDS/SALOMESDS_AutoRefCountPtr.hxx b/src/SALOMESDS/SALOMESDS_AutoRefCountPtr.hxx index e4046eae6..fc8ecb288 100644 --- a/src/SALOMESDS/SALOMESDS_AutoRefCountPtr.hxx +++ b/src/SALOMESDS/SALOMESDS_AutoRefCountPtr.hxx @@ -82,7 +82,7 @@ namespace SALOMESDS }; template - typename SALOMESDS::AutoRefCountPtr DynamicCast(typename SALOMESDS::AutoRefCountPtr& autoSubPtr) throw() + typename SALOMESDS::AutoRefCountPtr DynamicCast(typename SALOMESDS::AutoRefCountPtr& autoSubPtr) { T *subPtr(autoSubPtr); U *ptr(dynamic_cast(subPtr)); diff --git a/src/Utils/Utils_CommException.cxx b/src/Utils/Utils_CommException.cxx index f180cfa2f..89cbbd73e 100644 --- a/src/Utils/Utils_CommException.cxx +++ b/src/Utils/Utils_CommException.cxx @@ -43,6 +43,6 @@ CommException::CommException( const CommException &ex ): SALOME_Exception( ex ) } -CommException::~CommException() throw () +CommException::~CommException() { } diff --git a/src/Utils/Utils_CommException.hxx b/src/Utils/Utils_CommException.hxx index 41162e2ff..a252bee19 100644 --- a/src/Utils/Utils_CommException.hxx +++ b/src/Utils/Utils_CommException.hxx @@ -39,7 +39,7 @@ public : CommException( void ); CommException( const char *texte ); CommException( const CommException &ex ); - ~CommException() throw (); + ~CommException(); } ; # endif /* # if ( !defined __Utils_CommException_H__ ) */ diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index 708250654..3e5aeab01 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -68,7 +68,7 @@ void ORB_INIT::explicit_destroy() } } -CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv ) throw( CommException ) +CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv ) { try { if ( CORBA::is_nil( _orb ) ) diff --git a/src/Utils/Utils_ORB_INIT.hxx b/src/Utils/Utils_ORB_INIT.hxx index 6d2a6d2f5..5ad822f66 100644 --- a/src/Utils/Utils_ORB_INIT.hxx +++ b/src/Utils/Utils_ORB_INIT.hxx @@ -39,7 +39,7 @@ #ifdef WIN32 #pragma warning(disable:4251) // Warning DLL Interface ... -#pragma warning(disable:4290) // Warning Exception ... +//#pragma warning(disable:4290) // Warning Exception ... #endif /*! @@ -57,7 +57,7 @@ public : ORB_INIT( void ); virtual ~ORB_INIT(); void explicit_destroy(); - CORBA::ORB_var & operator() ( int argc , char **argv ) throw( CommException ) ; + CORBA::ORB_var & operator() ( int argc , char **argv ); inline CORBA::ORB_var &orb( void ); } ; diff --git a/src/Utils/Utils_SALOME_Exception.cxx b/src/Utils/Utils_SALOME_Exception.cxx index fe29ca1b8..999afd652 100644 --- a/src/Utils/Utils_SALOME_Exception.cxx +++ b/src/Utils/Utils_SALOME_Exception.cxx @@ -89,7 +89,7 @@ SALOME_Exception::SALOME_Exception( const char *text, const char *fileName, cons } -SALOME_Exception::~SALOME_Exception() throw () +SALOME_Exception::~SALOME_Exception() noexcept { if ( _text ) { @@ -116,7 +116,7 @@ std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ) -const char* SALOME_Exception::what( void ) const throw () +const char* SALOME_Exception::what( void ) const noexcept { return _text ; } diff --git a/src/Utils/Utils_SALOME_Exception.hxx b/src/Utils/Utils_SALOME_Exception.hxx index 6cfdd8883..d4d94d568 100644 --- a/src/Utils/Utils_SALOME_Exception.hxx +++ b/src/Utils/Utils_SALOME_Exception.hxx @@ -76,9 +76,9 @@ protected : public : SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 ); SALOME_Exception( const SALOME_Exception &ex ); - virtual ~SALOME_Exception() throw (); + virtual ~SALOME_Exception() noexcept; UTILS_EXPORT friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ); - virtual const char *what( void ) const throw () ; + virtual const char *what( void ) const noexcept; } ;