diff --git a/castor/BaseCnvSvc.cpp b/castor/BaseCnvSvc.cpp index 36309445ad14877d051ef0ad6f848fa75816e769..7a81c727be37e4f4648a85805b6d9e44aa5a5536 100644 --- a/castor/BaseCnvSvc.cpp +++ b/castor/BaseCnvSvc.cpp @@ -85,7 +85,7 @@ void castor::BaseCnvSvc::removeAlias(const unsigned int id) { //----------------------------------------------------------------------------- castor::IConverter* castor::BaseCnvSvc::converter (const unsigned int origObjType) - throw (castor::exception::Exception) { + { // First uses aliases unsigned int objType = origObjType; if (m_aliases.find(objType) != m_aliases.end()) { @@ -121,7 +121,7 @@ void castor::BaseCnvSvc::createRep(castor::IAddress* address, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // If no object, nothing to create if (0 != object) { // Look for an adapted converter @@ -139,7 +139,7 @@ void castor::BaseCnvSvc::bulkCreateRep(castor::IAddress* address, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // If no object, nothing to create if (objects.size() > 0) { // Look for an adapted converter @@ -157,7 +157,7 @@ void castor::BaseCnvSvc::bulkCreateRep(castor::IAddress* address, void castor::BaseCnvSvc::updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { // If no object, nothing to update if (0 != object) { // Look for an adapted converter @@ -174,7 +174,7 @@ void castor::BaseCnvSvc::updateRep(castor::IAddress* address, void castor::BaseCnvSvc::deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { // Look for an adapted converter // The converter is always valid if no exception is thrown IConverter* conv = converter(object->type()); @@ -187,7 +187,7 @@ void castor::BaseCnvSvc::deleteRep(castor::IAddress* address, // ----------------------------------------------------------------------- castor::IObject* castor::BaseCnvSvc::createObj (castor::IAddress* address) - throw (castor::exception::Exception) { + { // Look for an adapted converter // The converter is always valid if no exception is thrown castor::IConverter* conv = converter(address->objType()); @@ -199,7 +199,7 @@ castor::IObject* castor::BaseCnvSvc::createObj // ----------------------------------------------------------------------- std::vector<castor::IObject*> castor::BaseCnvSvc::bulkCreateObj (castor::IAddress* address) - throw (castor::exception::Exception) { + { // Look for an adapted converter // The converter is always valid if no exception is thrown castor::IConverter* conv = converter(address->objType()); @@ -210,7 +210,7 @@ std::vector<castor::IObject*> castor::BaseCnvSvc::bulkCreateObj // updateObj // ----------------------------------------------------------------------- void castor::BaseCnvSvc::updateObj(castor::IObject* object) - throw (castor::exception::Exception) { + { // Look for an adapted converter // The converter is always valid if no exception is thrown castor::IConverter* conv = converter(object->type()); @@ -224,7 +224,7 @@ void castor::BaseCnvSvc::fillRep(castor::IAddress* address, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { // Look for an adapted converter // The converter is always valid if no exception is thrown castor::IConverter* conv = converter(object->type()); @@ -238,7 +238,7 @@ void castor::BaseCnvSvc::fillObj(castor::IAddress* address, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { // Look for an adapted converter // The converter is always valid if no exception is thrown castor::IConverter* conv = converter(object->type()); @@ -250,7 +250,7 @@ void castor::BaseCnvSvc::fillObj(castor::IAddress* address, // ----------------------------------------------------------------------- void castor::BaseCnvSvc::deleteRepByAddress (castor::IAddress* address, bool endTransaction) - throw (castor::exception::Exception) { + { castor::IObject* obj = createObj(address); address->setObjType(obj->type()); deleteRep(address, obj, endTransaction); @@ -260,7 +260,7 @@ void castor::BaseCnvSvc::deleteRepByAddress (castor::IAddress* address, // commit //------------------------------------------------------------------------------ void castor::BaseCnvSvc::commit() - throw (castor::exception::Exception) { + { // Default implementation, does nothing. } @@ -268,7 +268,7 @@ void castor::BaseCnvSvc::commit() // rollback //------------------------------------------------------------------------------ void castor::BaseCnvSvc::rollback() - throw (castor::exception::Exception) { + { // Default implementation, does nothing. } @@ -276,7 +276,7 @@ void castor::BaseCnvSvc::rollback() // createStatement //------------------------------------------------------------------------------ castor::db::IDbStatement* castor::BaseCnvSvc::createStatement(const std::string&) - throw (castor::exception::Exception) { + { // Default implementation, does nothing. return 0; } diff --git a/castor/BaseCnvSvc.hpp b/castor/BaseCnvSvc.hpp index 7147da0890d3d83b24a1337ac148104326e653ae..107f67844f776763795e6cafbbd94bab3be581a0 100644 --- a/castor/BaseCnvSvc.hpp +++ b/castor/BaseCnvSvc.hpp @@ -91,7 +91,7 @@ namespace castor { * is found */ virtual IConverter* converter(const unsigned int objType) - throw (castor::exception::Exception); + ; /** * gets the representation type, that is the type of @@ -115,7 +115,7 @@ namespace castor { IObject* object, bool endTransaction, unsigned int type = OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * create foreign representations from a set of C++ Object @@ -133,7 +133,7 @@ namespace castor { std::vector<IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -147,7 +147,7 @@ namespace castor { virtual void updateRep(IAddress* address, IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -161,7 +161,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual IObject* createObj (IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -185,7 +185,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<IObject*> bulkCreateObj(IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -193,7 +193,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(IObject* object) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects @@ -209,7 +209,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception); + ; /** * Retrieve from the foreign representation some of the @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception); + ; /** * Forces the commit of the last changes. @@ -235,7 +235,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void commit() - throw (castor::exception::Exception); + ; /** * Forces the rollback of the last changes @@ -245,7 +245,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void rollback() - throw (castor::exception::Exception); + ; /** * Creates a prepared statement wrapped with the @@ -253,7 +253,7 @@ namespace castor { * @param stmt the string statement to be prepared */ virtual castor::db::IDbStatement* createStatement(const std::string& stmt) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object without @@ -268,7 +268,7 @@ namespace castor { */ virtual void deleteRepByAddress (IAddress* address, bool endTransaction = true) - throw (castor::exception::Exception); + ; private: /** diff --git a/castor/BaseObject.cpp b/castor/BaseObject.cpp index 841701d405542de5162add91616a6769b37a27f0..062470a192582f7fe7fc001898a59f97276e73d3 100644 --- a/castor/BaseObject.cpp +++ b/castor/BaseObject.cpp @@ -45,7 +45,7 @@ castor::BaseObject::BaseObject() throw() {} // sharedServices //------------------------------------------------------------------------------ castor::Services* castor::BaseObject::sharedServices() - throw (castor::exception::Exception) { + { // since this is the shared version, the instantiation of the singleton // has to be thread-safe. if (0 == s_sharedServices) { @@ -62,7 +62,7 @@ castor::Services* castor::BaseObject::sharedServices() // svcs //------------------------------------------------------------------------------ castor::Services* castor::BaseObject::svcs() - throw (castor::exception::Exception) { + { return services(); } @@ -70,7 +70,7 @@ castor::Services* castor::BaseObject::svcs() // services //------------------------------------------------------------------------------ castor::Services* castor::BaseObject::services() - throw (castor::exception::Exception) { + { castor::Services *services = (castor::Services *)pthread_getspecific(s_servicesKey); @@ -95,7 +95,7 @@ castor::Services* castor::BaseObject::services() // resetServices //------------------------------------------------------------------------------ void castor::BaseObject::resetServices() - throw (castor::exception::Exception) { + { // If the services where not allocated (unlikely), this will have the // side effect of allocating them. The key will be created anyhow, // which is what we need. diff --git a/castor/BaseObject.hpp b/castor/BaseObject.hpp index af8f429dca422f335962b95b12b9cca723d9c36a..e2acfd97bcbc1879f7df0970e2208a2a73609b69 100644 --- a/castor/BaseObject.hpp +++ b/castor/BaseObject.hpp @@ -55,24 +55,24 @@ namespace castor { /** * Static access to the underlying thread-safe Services object */ - static Services* services() throw(castor::exception::Exception); + static Services* services() ; /** * Static function to reset (deallocate + set the thread specific pointer * to NULL) the thread-specific services. Useful in test environments and * for clients which to not run the thread pools (but use the marshallers) */ - static void resetServices() throw(castor::exception::Exception); + static void resetServices() ; /** * Static access to the underlying thread-shared Services object */ - static Services* sharedServices() throw(castor::exception::Exception); + static Services* sharedServices() ; /** * Non static access to the underlying Services object */ - Services* svcs() throw(castor::exception::Exception); + Services* svcs() ; protected: @@ -88,7 +88,7 @@ namespace castor { */ class pthreadKey { public: - pthreadKey() throw (castor::exception::Exception) { + pthreadKey() { int rc = pthread_key_create(&m_key, NULL); if (rc != 0) { castor::exception::Exception e(rc); diff --git a/castor/IClientFactory.cpp b/castor/IClientFactory.cpp index afa4f97e184e938fbe2e0d90e6b553fd5b8a11f4..b11d461e5c4768edf8c3b2cfbc62e54fac5fbc22 100644 --- a/castor/IClientFactory.cpp +++ b/castor/IClientFactory.cpp @@ -38,7 +38,7 @@ //------------------------------------------------------------------------------ const std::string castor::IClientFactory::client2String (const castor::IClient &cl) - throw (castor::exception::Exception) { + { switch (cl.type()) { case castor::OBJ_Client : { @@ -67,7 +67,7 @@ const std::string castor::IClientFactory::client2String // string2Client //------------------------------------------------------------------------------ castor::IClient* castor::IClientFactory::string2Client(const std::string &st) - throw (castor::exception::Exception) { + { std::istringstream in(st); unsigned int type; in >> type; diff --git a/castor/IClientFactory.hpp b/castor/IClientFactory.hpp index 8dd0e33ac45aeb259de84b5de2de10abc2b610ec..507103d99247d701431a5eff09aa0bd5d846f0a0 100644 --- a/castor/IClientFactory.hpp +++ b/castor/IClientFactory.hpp @@ -51,7 +51,7 @@ namespace castor { */ static const std::string client2String (const castor::IClient &cl) - throw (castor::exception::Exception); + ; /** * creates a Client from its human readable @@ -64,7 +64,7 @@ namespace castor { */ static castor::IClient* string2Client (const std::string &st) - throw (castor::exception::Exception); + ; }; // end of class IClientFactory diff --git a/castor/ICnvSvc.hpp b/castor/ICnvSvc.hpp index e6a871be01fee64ed5a80fcbcdb6754d087bb0d1..810d7d212b4e3120cddee8a3b884356bae107c61 100644 --- a/castor/ICnvSvc.hpp +++ b/castor/ICnvSvc.hpp @@ -76,7 +76,7 @@ namespace castor { IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception) = 0; + = 0; /** * create foreign representations from a set of C++ Object @@ -94,7 +94,7 @@ namespace castor { std::vector<IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception) = 0; + = 0; /** * Updates foreign representation from a C++ Object. @@ -108,7 +108,7 @@ namespace castor { virtual void updateRep(IAddress* address, IObject* object, bool endTransaction) - throw (castor::exception::Exception) = 0; + = 0; /** * Deletes foreign representation of a C++ Object. @@ -122,7 +122,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction = true) - throw (castor::exception::Exception) = 0; + = 0; /** * create C++ object from foreign representation @@ -134,7 +134,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual IObject* createObj (IAddress* address) - throw (castor::exception::Exception) = 0; + = 0; /** * create C++ objects from foreign representations @@ -146,7 +146,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<IObject*> bulkCreateObj(IAddress* address) - throw (castor::exception::Exception) = 0; + = 0; /** * Updates C++ object from its foreign representation. @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(IObject* object) - throw (castor::exception::Exception) = 0; + = 0; /** * Fill the foreign representation with some of the objects @@ -170,7 +170,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception) = 0; + = 0; /** * Retrieve from the foreign representation some of the @@ -186,21 +186,21 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception) = 0; + = 0; /** * Forces the commit of the last changes. * @exception Exception throws an Exception in case of error */ virtual void commit() - throw (castor::exception::Exception) = 0; + = 0; /** * Forces the rollback of the last changes * @exception Exception throws an Exception in case of error */ virtual void rollback() - throw (castor::exception::Exception) = 0; + = 0; /** * Creates a prepared statement wrapped with the @@ -208,7 +208,7 @@ namespace castor { * @param stmt the string statement to be prepared */ virtual castor::db::IDbStatement* createStatement(const std::string& stmt) - throw (castor::exception::Exception) = 0; + = 0; /** * Deletes foreign representation of a C++ Object without @@ -223,7 +223,7 @@ namespace castor { */ virtual void deleteRepByAddress(IAddress* address, bool endTransaction = true) - throw (castor::exception::Exception) = 0; + = 0; }; diff --git a/castor/IConverter.hpp b/castor/IConverter.hpp index 5eb4b65cf33169f3f470aaaa8a9ade8484ae49f9..ed3bf9d3f9c3ded8391e0759ef8eec9fbc37df7b 100644 --- a/castor/IConverter.hpp +++ b/castor/IConverter.hpp @@ -79,7 +79,7 @@ namespace castor { IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) = 0; + = 0; /** * create foreign representations from a set of C++ Object @@ -97,7 +97,7 @@ namespace castor { std::vector<IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) = 0; + = 0; /** * Updates foreign representation from a C++ Object. @@ -111,7 +111,7 @@ namespace castor { virtual void updateRep(IAddress* address, IObject* object, bool endTransaction) - throw (castor::exception::Exception) = 0; + = 0; /** * deletes foreign representation of a C++ Object @@ -125,7 +125,7 @@ namespace castor { virtual void deleteRep(IAddress* address, IObject* object, bool endTransaction) - throw (castor::exception::Exception) = 0; + = 0; /** * create C++ object from foreign representation @@ -137,7 +137,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual IObject* createObj(IAddress* address) - throw (castor::exception::Exception) = 0; + = 0; /** * create C++ objects from foreign representations @@ -149,7 +149,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<IObject*> bulkCreateObj(IAddress* address) - throw (castor::exception::Exception) = 0; + = 0; /** * Updates C++ object from its foreign representation. @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(IObject* object) - throw (castor::exception::Exception) = 0; + = 0; /** @@ -174,7 +174,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception) = 0; + = 0; /** * Retrieve from the foreign representation some of the @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception) = 0; + = 0; }; diff --git a/castor/Services.cpp b/castor/Services.cpp index dbd0aea1e222b39ea01758db3571d7e815ece3e8..9efb6f4b3cf92f854e46bf3f95d5fa5408c9f497 100644 --- a/castor/Services.cpp +++ b/castor/Services.cpp @@ -58,7 +58,7 @@ castor::Services::~Services() { //----------------------------------------------------------------------------- castor::IService* castor::Services::service(const std::string name, const unsigned int id) - throw(castor::exception::Exception) { + { std::map<const std::string, IService*>::const_iterator it = m_services.find(name); if (it == m_services.end()) { if (id > 0) { @@ -93,7 +93,7 @@ castor::IService* castor::Services::service(const std::string name, //----------------------------------------------------------------------------- castor::ICnvSvc* castor::Services::cnvService(const std::string name, const unsigned int id) - throw(castor::exception::Exception) { + { IService* svc = service(name, id); if (0 == svc) { return 0; @@ -111,7 +111,7 @@ castor::ICnvSvc* castor::Services::cnvService(const std::string name, void castor::Services::createRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->createRep(address, object, endTransaction); @@ -123,7 +123,7 @@ void castor::Services::createRep(castor::IAddress* address, void castor::Services::bulkCreateRep(castor::IAddress* address, std::vector<castor::IObject*> &objects, bool endTransaction) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->bulkCreateRep(address, objects, endTransaction); @@ -135,7 +135,7 @@ void castor::Services::bulkCreateRep(castor::IAddress* address, void castor::Services::updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->updateRep(address, object, endTransaction); @@ -147,7 +147,7 @@ void castor::Services::updateRep(castor::IAddress* address, void castor::Services::deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->deleteRep(address, object, endTransaction); @@ -158,7 +158,7 @@ void castor::Services::deleteRep(castor::IAddress* address, // ----------------------------------------------------------------------- castor::ICnvSvc* castor::Services::cnvSvcFromAddress(castor::IAddress* address) - throw (castor::exception::Exception) { + { // check address if (0 == address) { castor::exception::Exception ex; @@ -182,7 +182,7 @@ castor::Services::cnvSvcFromAddress(castor::IAddress* address) // createObj // ----------------------------------------------------------------------- castor::IObject* castor::Services::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); castor::IObject* result = cnvSvc->createObj(address); @@ -194,7 +194,7 @@ castor::IObject* castor::Services::createObj(castor::IAddress* address) // ----------------------------------------------------------------------- std::vector<castor::IObject*> castor::Services::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); std::vector<castor::IObject*> result = cnvSvc->bulkCreateObj(address); @@ -206,7 +206,7 @@ castor::Services::bulkCreateObj(castor::IAddress* address) //------------------------------------------------------------------------------ void castor::Services::updateObj(castor::IAddress* address, castor::IObject* object) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->updateObj(object); @@ -216,7 +216,7 @@ void castor::Services::updateObj(castor::IAddress* address, // commit //------------------------------------------------------------------------------ void castor::Services::commit(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->commit(); @@ -230,7 +230,7 @@ void castor::Services::fillRep(castor::IAddress* address, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->fillRep(address, object, type, endTransaction); @@ -243,7 +243,7 @@ void castor::Services::fillObj(castor::IAddress* address, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->fillObj(address, object, type, endTransaction); @@ -253,7 +253,7 @@ void castor::Services::fillObj(castor::IAddress* address, // rollback //------------------------------------------------------------------------------ void castor::Services::rollback(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Always returns a valid cnvSvc or throws an exception castor::ICnvSvc* cnvSvc = cnvSvcFromAddress(address); cnvSvc->rollback(); diff --git a/castor/Services.hpp b/castor/Services.hpp index 892249cdee93d06e334b17b9b8cfd1c856cdb633..32414c698622de534ded6f7626c1939fd4d313a5 100644 --- a/castor/Services.hpp +++ b/castor/Services.hpp @@ -58,7 +58,7 @@ namespace castor { */ IService* service (const std::string name, const unsigned int id = 0) - throw(castor::exception::Exception); + ; /** * gets a conversion service by name. @@ -67,7 +67,7 @@ namespace castor { */ ICnvSvc* cnvService (const std::string name, const unsigned int id = 0) - throw(castor::exception::Exception); + ; /** * create foreign representation from a C++ Object @@ -81,7 +81,7 @@ namespace castor { void createRep(IAddress* address, IObject* object, bool endTransaction = true) - throw (castor::exception::Exception); + ; /** * create foreign representations from a set of C++ Object @@ -95,7 +95,7 @@ namespace castor { virtual void bulkCreateRep(IAddress* address, std::vector<IObject*> &objects, bool endTransaction = true) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -109,7 +109,7 @@ namespace castor { void updateRep(IAddress* address, IObject* object, bool endTransaction = true) - throw (castor::exception::Exception); + ; /** * deletes foreign representation of a C++ Object @@ -123,7 +123,7 @@ namespace castor { void deleteRep(IAddress* address, IObject* object, bool endTransaction = false) - throw (castor::exception::Exception); + ; /** * create C++ object from foreign representation @@ -135,7 +135,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ IObject* createObj(IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -147,7 +147,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ std::vector<IObject*> bulkCreateObj(IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -159,7 +159,7 @@ namespace castor { */ virtual void updateObj(castor::IAddress* address, castor::IObject* object) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects @@ -175,7 +175,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the foreign representation some of the @@ -191,7 +191,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception); + ; /** * Forces the commit of the last changes in a given DB @@ -199,7 +199,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void commit(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Forces the rollback of the last changes in a given DB @@ -207,7 +207,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void rollback(castor::IAddress* address) - throw (castor::exception::Exception); + ; private: /** @@ -215,7 +215,7 @@ namespace castor { * address */ castor::ICnvSvc* cnvSvcFromAddress(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** the list of services, by name */ std::map<const std::string, IService*> m_services; diff --git a/castor/SvcFactory.hpp b/castor/SvcFactory.hpp index 824dc1c1dd75bb48f3c30526f1b7b90f75827548..009036e9e7578d856dc0fb9351f9d429d67c41f6 100644 --- a/castor/SvcFactory.hpp +++ b/castor/SvcFactory.hpp @@ -52,7 +52,7 @@ namespace castor { * @param name the service name */ virtual IService* instantiate(const std::string name) const - throw (castor::exception::Exception); + ; /** Get ID of the factory, i.e. of the underlying Service */ unsigned int id() const; @@ -68,7 +68,7 @@ inline castor::SvcFactory<Service>::SvcFactory() throw() { template <class Service> inline castor::IService* castor::SvcFactory<Service>::instantiate(const std::string name) const - throw (castor::exception::Exception) { + { return new Service(name); } diff --git a/castor/System.cpp b/castor/System.cpp index 88eacc15cf37cb6038526c0ca973ceb36f45c4c5..0b080c0a71e349020539948b87e1748c937034f7 100644 --- a/castor/System.cpp +++ b/castor/System.cpp @@ -41,7 +41,7 @@ //------------------------------------------------------------------------------ // getHostName //------------------------------------------------------------------------------ -std::string castor::System::getHostName() throw (castor::exception::Exception) +std::string castor::System::getHostName() { // All this to get the hostname, thanks to C ! int len = 64; @@ -98,7 +98,7 @@ std::string castor::System::getHostName() throw (castor::exception::Exception) // porttoi //------------------------------------------------------------------------------ int castor::System::porttoi(char* str) - throw (castor::exception::Exception) { + { char* dp = str; errno = 0; int iport = strtoul(str, &dp, 0); @@ -122,7 +122,7 @@ int castor::System::porttoi(char* str) //------------------------------------------------------------------------------ std::string castor::System::ipAddressToHostname (unsigned long long ipAddress) - throw (castor::exception::Exception) { + { std::ostringstream res; res << ((ipAddress & 0xFF000000) >> 24) << "." << ((ipAddress & 0x00FF0000) >> 16) << "." @@ -146,7 +146,7 @@ std::string castor::System::ipAddressToHostname // switchToCastorSuperuser //------------------------------------------------------------------------------ void castor::System::switchToCastorSuperuser() - throw (castor::exception::Exception) { + { struct passwd *stage_passwd; // password structure pointer struct group *stage_group; // group structure pointer diff --git a/castor/System.hpp b/castor/System.hpp index bf368c93568eb00ccf7363c96fee2315729a8c66..0a668d16aa613edad1945233d3bdebac6ac73d2c 100644 --- a/castor/System.hpp +++ b/castor/System.hpp @@ -40,7 +40,7 @@ namespace castor { * the gethostname() API. * @exception in case of an error */ - static std::string getHostName() throw (castor::exception::Exception); + static std::string getHostName() ; /** * Converts a string into a port number, checking @@ -49,7 +49,7 @@ namespace castor { * @return the port as an int * @exception in case of invalid value */ - static int porttoi(char* str) throw (castor::exception::Exception); + static int porttoi(char* str) ; /** * Converts an ip address to a hostname @@ -58,14 +58,14 @@ namespace castor { */ static std::string ipAddressToHostname (unsigned long long ipAddress) - throw (castor::exception::Exception); + ; /** * Switches the current process to use the Castor superuser * (typically stage:st). * @exception in case of an error */ - static void switchToCastorSuperuser() throw (castor::exception::Exception); + static void switchToCastorSuperuser() ; }; diff --git a/castor/client/BaseClient.cpp b/castor/client/BaseClient.cpp index 7a03f10405eb6ba2f7b0dcef65f483fdfcfaf810..6a932e1eaff28c8c4c78e3461fd0e02d3f8d5bfe 100644 --- a/castor/client/BaseClient.cpp +++ b/castor/client/BaseClient.cpp @@ -163,7 +163,7 @@ castor::client::BaseClient::~BaseClient() throw() { std::string castor::client::BaseClient::sendRequest (castor::stager::Request* req, castor::client::IResponseHandler* rh) - throw(castor::exception::Exception) { + { // Build and send the Request with the Client information createClientAndSend(req); @@ -187,7 +187,7 @@ std::string castor::client::BaseClient::sendRequest // createClient //------------------------------------------------------------------------------ castor::IClient* castor::client::BaseClient::createClient() - throw (castor::exception::Exception) { + { // if no callbackSocket if (0 == m_callbackSocket) { castor::exception::Exception ex; @@ -210,7 +210,7 @@ castor::IClient* castor::client::BaseClient::createClient() //------------------------------------------------------------------------------ std::string castor::client::BaseClient::internalSendRequest (castor::stager::Request& request) - throw (castor::exception::Exception) { + { std::string requestId; // The service class has been previously resolved, attach it to the request @@ -283,12 +283,12 @@ std::string castor::client::BaseClient::internalSendRequest // setRhPort //------------------------------------------------------------------------------ void castor::client::BaseClient::setRhPort() - throw (castor::exception::Exception) { + { setRhPort(0); } void castor::client::BaseClient::setRhPort(int optPort) - throw (castor::exception::Exception) { + { if (optPort > 65535) { castor::exception::Exception e(EINVAL); @@ -329,12 +329,12 @@ void castor::client::BaseClient::setRhPort(int optPort) // setRhHost //------------------------------------------------------------------------------ void castor::client::BaseClient::setRhHost() - throw (castor::exception::Exception) { + { setRhHost(""); } void castor::client::BaseClient::setRhHost(std::string optHost) - throw (castor::exception::Exception) { + { // RH server host. Can be passed given through the // STAGER_HOST environment variable or in the castor.conf // file as a STAGER/HOST entry @@ -361,12 +361,12 @@ void castor::client::BaseClient::setRhHost(std::string optHost) // setRhSvcClass //------------------------------------------------------------------------------ void castor::client::BaseClient::setRhSvcClass() - throw (castor::exception::Exception) { + { setRhSvcClass(""); } void castor::client::BaseClient::setRhSvcClass(std::string optSvcClass) - throw (castor::exception::Exception) { + { // RH server host. Can be passed given through the // RH_HOST environment variable or in the castor.conf // file as a RH/HOST entry @@ -391,7 +391,7 @@ void castor::client::BaseClient::setRhSvcClass(std::string optSvcClass) // setOptions //------------------------------------------------------------------------------ void castor::client::BaseClient::setOptions(struct stage_options* opts) - throw (castor::exception::Exception) { + { if (0 != opts) { setRhHost(opts->stage_host); setRhPort(opts->stage_port); @@ -421,7 +421,7 @@ std::string castor::client::BaseClient::requestId() { // setAutorizationId //---------------------------------------------------------------------------- void castor::client::BaseClient::setAuthorizationId() - throw(castor::exception::Exception) { + { if (stage_getid(&m_authUid, &m_authGid) < 0) { castor::exception::Exception e(serrno); e.getMessage() << "Error in stage_getid" << std::endl; @@ -443,7 +443,7 @@ void castor::client::BaseClient::setAuthorizationId(uid_t uid, gid_t gid) throw( //------------------------------------------------------------------------------ // setAuthorization //------------------------------------------------------------------------------ -void castor::client::BaseClient::setAuthorization() throw(castor::exception::Exception) { +void castor::client::BaseClient::setAuthorization() { char *security; // Check if security env option is set. if (((security = getenv (castor::client::SECURITY_ENV)) != 0 || @@ -461,7 +461,7 @@ void castor::client::BaseClient::setAuthorization() throw(castor::exception::Exc //------------------------------------------------------------------------------ std::string castor::client::BaseClient::createClientAndSend (castor::stager::Request *req) - throw (castor::exception::Exception) { + { // builds the Client (uuid,guid,hostname,etc) buildClient(req); @@ -474,7 +474,7 @@ std::string castor::client::BaseClient::createClientAndSend // buildClient //------------------------------------------------------------------------------ void castor::client::BaseClient::buildClient(castor::stager::Request* req) - throw (castor::exception::Exception) { + { // Uid uid_t euid; @@ -594,7 +594,7 @@ void castor::client::BaseClient::buildClient(castor::stager::Request* req) //------------------------------------------------------------------------------ void castor::client::BaseClient::pollAnswersFromStager (castor::stager::Request* req, castor::client::IResponseHandler* rh) - throw (castor::exception::Exception) { + { // Check parameters if ((req == NULL) || (req->client() == NULL)) { diff --git a/castor/client/BaseClient.hpp b/castor/client/BaseClient.hpp index f20684e712890ce5976ed6f7f99d182bf41f3cc0..e9cec4c62f90fc959be5450293ec207871ed1989 100644 --- a/castor/client/BaseClient.hpp +++ b/castor/client/BaseClient.hpp @@ -127,12 +127,12 @@ namespace castor { */ std::string sendRequest(castor::stager::Request* req, castor::client::IResponseHandler* rh) - throw(castor::exception::Exception); + ; /** * Get the userid and groupid and set the authorization values. */ - void setAuthorizationId() throw(castor::exception::Exception); + void setAuthorizationId() ; /** * Sets the authorization ID under which the request should be sent. @@ -143,7 +143,7 @@ namespace castor { * Set the Authorization mechanism. */ void setAuthorization() - throw (castor::exception::Exception); + ; /** * gets the request handler port to use and put it @@ -154,9 +154,9 @@ namespace castor { * modified. */ virtual void setRhPort(int optPort) - throw (castor::exception::Exception); + ; virtual void setRhPort() - throw (castor::exception::Exception); + ; /** * gets the request handler host to use and put it @@ -167,18 +167,18 @@ namespace castor { * modified. */ virtual void setRhHost(std::string optHost) - throw (castor::exception::Exception); + ; virtual void setRhHost() - throw (castor::exception::Exception); + ; /** * Gets the service class to be used with a similar * strategy as above. */ virtual void setRhSvcClass(std::string optSvcClass) - throw (castor::exception::Exception); + ; virtual void setRhSvcClass() - throw (castor::exception::Exception); + ; /** * Gathers options from the parameter and calls the @@ -189,7 +189,7 @@ namespace castor { * and service class. */ virtual void setOptions(struct stage_options* opts) - throw (castor::exception::Exception); + ; /** * Sets the request ID in the base client @@ -209,7 +209,7 @@ namespace castor { */ void pollAnswersFromStager(castor::stager::Request* req, castor::client::IResponseHandler* rh) - throw (castor::exception::Exception); + ; /** * calls buildClient and internalSendRequest to create and send the @@ -218,7 +218,7 @@ namespace castor { * @exception in case of an error */ std::string createClientAndSend(castor::stager::Request *req) - throw (castor::exception::Exception); + ; private: @@ -228,13 +228,13 @@ namespace castor { * new client */ virtual IClient* createClient() - throw (castor::exception::Exception); + ; /** * sends a request to the request handler */ std::string internalSendRequest(castor::stager::Request& request) - throw (castor::exception::Exception); + ; /** * Builds the Client for a Request. The userid, groupid, hostname, etc @@ -243,7 +243,7 @@ namespace castor { * @exception in case of an error */ void buildClient(castor::stager::Request* req) - throw (castor::exception::Exception); + ; public: // protected: diff --git a/castor/client/BasicResponseHandler.cpp b/castor/client/BasicResponseHandler.cpp index 91690a22355fe83f4330f5981d8dcd68c0c71ff5..0cb1f63193b6faa2af9dd609891ea4345f5057f4 100644 --- a/castor/client/BasicResponseHandler.cpp +++ b/castor/client/BasicResponseHandler.cpp @@ -32,7 +32,7 @@ //------------------------------------------------------------------------------ void castor::client::BasicResponseHandler::handleResponse (castor::rh::Response& r) - throw (castor::exception::Exception) { + { castor::rh::BasicResponse *resp = dynamic_cast<castor::rh::BasicResponse*>(&r); if (resp->errorCode() > 0) { diff --git a/castor/client/BasicResponseHandler.hpp b/castor/client/BasicResponseHandler.hpp index 1dc6f7dd5b296b53bf37301a151a19e09205d858..536669fc9acf51735dc3a9df2f859c5f8e0a0bd0 100644 --- a/castor/client/BasicResponseHandler.hpp +++ b/castor/client/BasicResponseHandler.hpp @@ -55,14 +55,14 @@ namespace castor { * @param r the response to handle */ virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception); + ; /** * terminates the response handler. This is called * when all responses were received. */ virtual void terminate() - throw (castor::exception::Exception) {}; + {}; }; // end of BasicResponseHandler diff --git a/castor/client/IResponseHandler.hpp b/castor/client/IResponseHandler.hpp index d0c2aa9a4584f4ef760d6d709cc5902f53de3bfc..2dd519cab7fb94d27027996dd0f3a757d3cc080a 100644 --- a/castor/client/IResponseHandler.hpp +++ b/castor/client/IResponseHandler.hpp @@ -51,14 +51,14 @@ namespace castor { * @param r the response to handle */ virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) = 0; + = 0; /** * terminates the response handler. This is called * when all responses were received. */ virtual void terminate() - throw (castor::exception::Exception) = 0; + = 0; }; diff --git a/castor/client/VectorResponseHandler.cpp b/castor/client/VectorResponseHandler.cpp index eedcea5b1b9b494a651677acc44a4f60c23e5e64..28148c5e90d66f587e46d3fc9d22ec9af4e4ce76 100644 --- a/castor/client/VectorResponseHandler.cpp +++ b/castor/client/VectorResponseHandler.cpp @@ -37,7 +37,7 @@ //------------------------------------------------------------------------------ castor::client::VectorResponseHandler::VectorResponseHandler (std::vector<castor::rh::Response *> *vector) - throw (castor::exception::Exception) { + { if (0 == vector) { castor::exception::Exception e(EINVAL); e.getMessage() << "Null pointer passed to VectorResponseHandler constructor"; @@ -51,7 +51,7 @@ castor::client::VectorResponseHandler::VectorResponseHandler //------------------------------------------------------------------------------ void castor::client::VectorResponseHandler::handleResponse (castor::rh::Response& r) - throw (castor::exception::Exception) { + { castor::IObject *obj = r.clone(); castor::rh::Response *resp = dynamic_cast<castor::rh::Response *>(obj); if (0 == resp) { diff --git a/castor/client/VectorResponseHandler.hpp b/castor/client/VectorResponseHandler.hpp index f144d1cd71683a8fe1533f45c74e6f8c407ca992..15689561a688a64d58b5e2a1bd3c70c0aac53203 100644 --- a/castor/client/VectorResponseHandler.hpp +++ b/castor/client/VectorResponseHandler.hpp @@ -49,13 +49,13 @@ namespace castor { public: VectorResponseHandler(std::vector<castor::rh::Response *> *vector) - throw (castor::exception::Exception); + ; virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception); + ; virtual void terminate() - throw (castor::exception::Exception) { + { }; diff --git a/castor/common/CastorConfiguration.cpp b/castor/common/CastorConfiguration.cpp index 3c14a08071e8a157b87f48cb6534d2e1e793cf57..e5a78084a04ae9ea25e18efc1885cfc742e70707 100644 --- a/castor/common/CastorConfiguration.cpp +++ b/castor/common/CastorConfiguration.cpp @@ -40,7 +40,7 @@ static pthread_mutex_t s_globalConfigLock = PTHREAD_MUTEX_INITIALIZER; //------------------------------------------------------------------------------ castor::common::CastorConfiguration& castor::common::CastorConfiguration::getConfig(std::string fileName) - throw (castor::exception::Exception) { + { // This method is non thread safe, and is protected by the s_globalConfigLock // lock int rc = pthread_mutex_lock(&s_globalConfigLock); @@ -73,7 +73,7 @@ castor::common::CastorConfiguration::getConfig(std::string fileName) // constructor //------------------------------------------------------------------------------ castor::common::CastorConfiguration::CastorConfiguration(std::string fileName) - throw (castor::exception::Exception) : m_fileName(fileName), + : m_fileName(fileName), m_lastUpdateTime(0) { // create internal r/w lock int rc = pthread_rwlock_init(&m_lock, NULL); @@ -89,7 +89,7 @@ castor::common::CastorConfiguration::CastorConfiguration(std::string fileName) // copy constructor //------------------------------------------------------------------------------ castor::common::CastorConfiguration::CastorConfiguration( - const CastorConfiguration & other) throw (castor::exception::Exception): + const CastorConfiguration & other) : m_fileName(other.m_fileName), m_lastUpdateTime(other.m_lastUpdateTime), m_config(other.m_config) { // create a new internal r/w lock @@ -116,7 +116,7 @@ castor::common::CastorConfiguration::~CastorConfiguration() { castor::common::CastorConfiguration & castor::common::CastorConfiguration::operator=( const castor::common::CastorConfiguration & other) - throw (castor::exception::Exception) { + { m_fileName = other.m_fileName; m_lastUpdateTime = other.m_lastUpdateTime; m_config = other.m_config; @@ -137,7 +137,7 @@ castor::common::CastorConfiguration & const std::string& castor::common::CastorConfiguration::getConfEnt(const std::string &category, const std::string &key) - throw (castor::exception::Exception) { + { // check whether we need to reload the configuration if (isStale()) { tryToRenewConfig(); @@ -182,7 +182,7 @@ castor::common::CastorConfiguration::getConfEnt(const std::string &category, // isStale //------------------------------------------------------------------------------ bool castor::common::CastorConfiguration::isStale() - throw (castor::exception::Exception) { + { // get read lock int rc = pthread_rwlock_rdlock(&m_lock); if (0 != rc) { @@ -209,7 +209,7 @@ bool castor::common::CastorConfiguration::isStale() // tryToRenewConfig //------------------------------------------------------------------------------ void castor::common::CastorConfiguration::tryToRenewConfig() - throw (castor::exception::Exception) { + { // we should probably renew. First take the write lock. int rc = pthread_rwlock_wrlock(&m_lock); if (0 != rc) { @@ -239,7 +239,7 @@ void castor::common::CastorConfiguration::tryToRenewConfig() // getTimeoutNolock //------------------------------------------------------------------------------ int castor::common::CastorConfiguration::getTimeoutNolock() - throw (castor::exception::Exception) { + { // start with the default (300s = 5mn) int timeout = 300; // get value from config @@ -260,7 +260,7 @@ int castor::common::CastorConfiguration::getTimeoutNolock() // renewConfigNolock //------------------------------------------------------------------------------ void castor::common::CastorConfiguration::renewConfigNolock() - throw (castor::exception::Exception) { + { // reset the config m_config.clear(); @@ -272,7 +272,7 @@ void castor::common::CastorConfiguration::renewConfigNolock() ex.getMessage() << __FUNCTION__ << " failed" ": Failed to open file" ": m_fileName=" << m_fileName; - throw(ex); + throw ex; } std::string line; diff --git a/castor/common/CastorConfiguration.hpp b/castor/common/CastorConfiguration.hpp index a0ea7972cfd04cfe04f680c79d60d8499091b5ec..bca213dac513cdc7e957e9f1519360bcb2859fa9 100644 --- a/castor/common/CastorConfiguration.hpp +++ b/castor/common/CastorConfiguration.hpp @@ -54,7 +54,7 @@ namespace castor { * @param fileName the name of the file to be used for filling this configuration */ static CastorConfiguration& getConfig(const std::string filename = "/etc/castor/castor.conf") - throw (castor::exception::Exception); + ; public: @@ -63,14 +63,14 @@ namespace castor { * @param fileName the file that should be used to build the configuration */ CastorConfiguration(std::string fileName = "/etc/castor/castor.conf") - throw (castor::exception::Exception); + ; /** * copy constructor * @param other instance of CastorConfiguration class */ CastorConfiguration(const CastorConfiguration & other) - throw (castor::exception::Exception); + ; /** * destrcutor @@ -82,7 +82,7 @@ namespace castor { * @param other instance of CastorConfiguration class */ CastorConfiguration & operator=(const CastorConfiguration & other) - throw (castor::exception::Exception); + ; /** * retrieves a configuration entry @@ -91,21 +91,21 @@ namespace castor { */ const std::string& getConfEnt(const std::string &category, const std::string &key) - throw (castor::exception::Exception); + ; private: /** * check whether the configuration should be renewed */ - bool isStale() throw (castor::exception::Exception); + bool isStale() ; /** * tries to renew the configuration. * That is : take the write lock to do it, check whether it's needed * and do it only if needed before releasing the lock */ - void tryToRenewConfig() throw (castor::exception::Exception); + void tryToRenewConfig() ; /** * gets current timeout value (in seconds) @@ -113,7 +113,7 @@ namespace castor { * configuration. So it should never be called without holding * a read or a write lock */ - int getTimeoutNolock() throw (castor::exception::Exception); + int getTimeoutNolock() ; /** * renews the configuration @@ -121,7 +121,7 @@ namespace castor { * configuration. So it should never be called without holding * the write lock */ - void renewConfigNolock() throw (castor::exception::Exception); + void renewConfigNolock() ; private: diff --git a/castor/db/DbBaseObj.cpp b/castor/db/DbBaseObj.cpp index a5f6c69693f098c76df426ad9788e1c3681a7440..a08d6284fba0490ec7c91ca80f348adb0e435881 100644 --- a/castor/db/DbBaseObj.cpp +++ b/castor/db/DbBaseObj.cpp @@ -46,7 +46,7 @@ castor::db::DbBaseObj::DbBaseObj(castor::ICnvSvc* service) : // initCnvSvc // ----------------------------------------------------------------------- void castor::db::DbBaseObj::initCnvSvc() - throw (castor::exception::Exception) { + { m_cnvSvc = dynamic_cast<castor::db::DbCnvSvc*> (svcs()->cnvService(m_cnvSvcName, SVC_DBCNV)); if (!m_cnvSvc) { @@ -61,7 +61,7 @@ void castor::db::DbBaseObj::initCnvSvc() // ----------------------------------------------------------------------- castor::db::IDbStatement* castor::db::DbBaseObj::createStatement(const std::string &stmtString) - throw (castor::exception::Exception) { + { return cnvSvc()->createStatement(stmtString); } @@ -69,7 +69,7 @@ castor::db::DbBaseObj::createStatement(const std::string &stmtString) // cnvSvc // ----------------------------------------------------------------------- castor::db::DbCnvSvc* castor::db::DbBaseObj::cnvSvc() - throw (castor::exception::Exception) { + { if (0 == m_cnvSvc) initCnvSvc(); return m_cnvSvc; } diff --git a/castor/db/DbBaseObj.hpp b/castor/db/DbBaseObj.hpp index 85c3568ca08e7bb4ef4d358291903563aeee6a20..4a28c3a56b67c2d45ebf31beb25325949ea269f5 100644 --- a/castor/db/DbBaseObj.hpp +++ b/castor/db/DbBaseObj.hpp @@ -62,7 +62,7 @@ namespace castor { /** * inits the conversion service to be used */ - void initCnvSvc() throw (castor::exception::Exception); + void initCnvSvc() ; /** * creates a statement from a string. Note that the @@ -73,19 +73,19 @@ namespace castor { * @return the newly created statement, wrapped by CDBC API */ castor::db::IDbStatement* createStatement(const std::string &stmtString) - throw (castor::exception::Exception); + ; /** * access to the underlying database conversion service for child classes */ - castor::db::DbCnvSvc* cnvSvc() throw (castor::exception::Exception); + castor::db::DbCnvSvc* cnvSvc() ; /** * register a Service to the underlying conversion service. * The conversion service is created if needed. * @param svc the service to register */ - void registerToCnvSvc(castor::IService* svc) throw () { + void registerToCnvSvc(castor::IService* svc) throw() { cnvSvc()->registerDepSvc(svc); } @@ -94,7 +94,7 @@ namespace castor { * In case no conversion service exists, this is a noop * @param svc the service to unregister */ - void unregisterFromCnvSvc(castor::IService* svc) throw () { + void unregisterFromCnvSvc(castor::IService* svc) throw() { if (m_cnvSvc) m_cnvSvc->unregisterDepSvc(svc); } diff --git a/castor/db/DbCnvSvc.cpp b/castor/db/DbCnvSvc.cpp index c9740503c9efd33a8b3f41b89edef359016db655..5d2a345eb0486d9717c5cc67ffc40b6a47f576ef 100644 --- a/castor/db/DbCnvSvc.cpp +++ b/castor/db/DbCnvSvc.cpp @@ -79,7 +79,7 @@ void castor::db::DbCnvSvc::reset() throw() { // getObjFromId // ----------------------------------------------------------------------- castor::IObject* castor::db::DbCnvSvc::getObjFromId(u_signed64 id, int objType) - throw (castor::exception::Exception) { + { castor::BaseAddress clientAd; clientAd.setTarget(id); clientAd.setObjType(objType); @@ -93,7 +93,7 @@ castor::IObject* castor::db::DbCnvSvc::getObjFromId(u_signed64 id, int objType) // ----------------------------------------------------------------------- std::vector<castor::IObject*> castor::db::DbCnvSvc::getObjsFromIds (std::vector<u_signed64> &ids, int objType) - throw (castor::exception::Exception) { + { castor::VectorAddress clientAd; clientAd.setTarget(ids); clientAd.setObjType(objType); diff --git a/castor/db/DbCnvSvc.hpp b/castor/db/DbCnvSvc.hpp index c5de1384acb9745b80c140710783a2f64fc2c681..14a14cc8d366e218e7a195d317a07ed190da30f6 100644 --- a/castor/db/DbCnvSvc.hpp +++ b/castor/db/DbCnvSvc.hpp @@ -76,7 +76,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ castor::IObject* getObjFromId (u_signed64 id, int objType) - throw (castor::exception::Exception); + ; /** * Get a set of objects from a set of ids. @@ -88,7 +88,7 @@ namespace castor { */ std::vector<castor::IObject*> getObjsFromIds(std::vector<u_signed64> &ids, int objType) - throw (castor::exception::Exception); + ; /** * Handles database exceptions and make sure everything is reset diff --git a/castor/db/IDbResultSet.hpp b/castor/db/IDbResultSet.hpp index 218e2fad49ef64fb613b8b6cc30e717ce9171439..1200e9fb62723bd58eeccfd446703ae3a42f3202 100644 --- a/castor/db/IDbResultSet.hpp +++ b/castor/db/IDbResultSet.hpp @@ -49,25 +49,25 @@ namespace castor { /** * */ - virtual bool next(int count = 1) throw (castor::exception::SQLError) = 0; + virtual bool next(int count = 1) = 0; /** * * @param i */ - virtual int getInt(int i) throw (castor::exception::SQLError) = 0; - virtual signed64 getInt64(int i) throw (castor::exception::SQLError) = 0; - virtual u_signed64 getUInt64(int i) throw (castor::exception::SQLError) = 0; - virtual std::string getString(int i) throw (castor::exception::SQLError) = 0; - virtual std::string getClob(int i) throw (castor::exception::Exception) = 0; - virtual float getFloat(int i) throw (castor::exception::SQLError) = 0; - virtual double getDouble(int i) throw (castor::exception::SQLError) = 0; + virtual int getInt(int i) = 0; + virtual signed64 getInt64(int i) = 0; + virtual u_signed64 getUInt64(int i) = 0; + virtual std::string getString(int i) = 0; + virtual std::string getClob(int i) = 0; + virtual float getFloat(int i) = 0; + virtual double getDouble(int i) = 0; /** * */ virtual void setDataBuffer(int pos, void* buffer, unsigned dbType, unsigned size, void* bufLen) - throw (castor::exception::SQLError) = 0; + = 0; }; } diff --git a/castor/db/IDbStatement.hpp b/castor/db/IDbStatement.hpp index fc129fa912321b8f8e3fb1ee7fbc2f6f68167b95..b468d8ab74211a8de1004ab99d926dfa2be4cf43 100644 --- a/castor/db/IDbStatement.hpp +++ b/castor/db/IDbStatement.hpp @@ -63,38 +63,38 @@ namespace castor { virtual void setNull(int pos) = 0; virtual void setDataBuffer(int pos, void* buffer, unsigned dbType, unsigned size, void* bufLens) - throw (castor::exception::SQLError) = 0; + = 0; virtual void setDataBufferArray(int pos, void* buffer, unsigned dbType, unsigned size, unsigned elementSize, void* bufLens) - throw (castor::exception::Exception) = 0; + = 0; virtual void setDataBufferUInt64Array(int pos, std::vector<u_signed64> data) - throw (castor::exception::Exception) = 0; + = 0; virtual void registerOutParam(int pos, unsigned dbType) - throw (castor::exception::SQLError) = 0; + = 0; - virtual int getInt(int pos) throw (castor::exception::SQLError) = 0; - virtual signed64 getInt64(int pos) throw (castor::exception::SQLError) = 0; - virtual u_signed64 getUInt64(int pos) throw (castor::exception::SQLError) = 0; - virtual std::string getString(int pos) throw (castor::exception::SQLError) = 0; - virtual float getFloat(int pos) throw (castor::exception::SQLError) = 0; - virtual double getDouble(int pos) throw (castor::exception::SQLError) = 0; - virtual std::string getClob(int pos) throw (castor::exception::Exception) = 0; - virtual castor::db::IDbResultSet* getCursor(int pos) throw (castor::exception::SQLError) = 0; + virtual int getInt(int pos) = 0; + virtual signed64 getInt64(int pos) = 0; + virtual u_signed64 getUInt64(int pos) = 0; + virtual std::string getString(int pos) = 0; + virtual float getFloat(int pos) = 0; + virtual double getDouble(int pos) = 0; + virtual std::string getClob(int pos) = 0; + virtual castor::db::IDbResultSet* getCursor(int pos) = 0; /** * */ virtual castor::db::IDbResultSet* executeQuery() - throw (castor::exception::SQLError) = 0; + = 0; /** * */ virtual int execute(int count = 1) - throw (castor::exception::Exception) = 0; + = 0; }; diff --git a/castor/db/cnv/DbBWUserCnv.cpp b/castor/db/cnv/DbBWUserCnv.cpp index 6594a53755006e509250eee2b8538eed5eee5d56..90d7b74973723ccaed062860d998bc59b0de9024 100644 --- a/castor/db/cnv/DbBWUserCnv.cpp +++ b/castor/db/cnv/DbBWUserCnv.cpp @@ -150,7 +150,7 @@ void castor::db::cnv::DbBWUserCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); try { @@ -180,7 +180,7 @@ void castor::db::cnv::DbBWUserCnv::fillRep(castor::IAddress*, // fillRepChangePrivilege //------------------------------------------------------------------------------ void castor::db::cnv::DbBWUserCnv::fillRepChangePrivilege(castor::bwlist::BWUser* obj) - throw (castor::exception::Exception) { + { if (0 != obj->request()) { // Check checkChangePrivilegeExist statement if (0 == m_checkChangePrivilegeExistStatement) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbBWUserCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); switch (type) { @@ -238,7 +238,7 @@ void castor::db::cnv::DbBWUserCnv::fillObj(castor::IAddress*, // fillObjChangePrivilege //------------------------------------------------------------------------------ void castor::db::cnv::DbBWUserCnv::fillObjChangePrivilege(castor::bwlist::BWUser* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -281,7 +281,7 @@ void castor::db::cnv::DbBWUserCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); // check whether something needs to be done @@ -328,7 +328,7 @@ void castor::db::cnv::DbBWUserCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -451,7 +451,7 @@ void castor::db::cnv::DbBWUserCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbBWUserCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); // check whether something needs to be done @@ -490,7 +490,7 @@ void castor::db::cnv::DbBWUserCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbBWUserCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); // check whether something needs to be done @@ -528,7 +528,7 @@ void castor::db::cnv::DbBWUserCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbBWUserCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -568,7 +568,7 @@ castor::IObject* castor::db::cnv::DbBWUserCnv::createObj(castor::IAddress* addre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbBWUserCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -618,7 +618,7 @@ castor::db::cnv::DbBWUserCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbBWUserCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbBWUserCnv.hpp b/castor/db/cnv/DbBWUserCnv.hpp index 15c6caccde0031c5e1c2589eda4b5d4208fca01f..5c4e288b881bec8509e262d2fee91370bed7b9fb 100644 --- a/castor/db/cnv/DbBWUserCnv.hpp +++ b/castor/db/cnv/DbBWUserCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type ChangePrivilege refered by a given @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepChangePrivilege(castor::bwlist::BWUser* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -210,7 +210,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type ChangePrivilege refered by a given @@ -219,7 +219,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjChangePrivilege(castor::bwlist::BWUser* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbBaseAddressCnv.cpp b/castor/db/cnv/DbBaseAddressCnv.cpp index 05831ac51fdcc230ccd936a861b8f53a5cc8e662..042021a788d32db867c20eb5b4cd5f9ce2b78424 100644 --- a/castor/db/cnv/DbBaseAddressCnv.cpp +++ b/castor/db/cnv/DbBaseAddressCnv.cpp @@ -135,7 +135,7 @@ void castor::db::cnv::DbBaseAddressCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); try { @@ -165,7 +165,7 @@ void castor::db::cnv::DbBaseAddressCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); switch (type) { @@ -188,7 +188,7 @@ void castor::db::cnv::DbBaseAddressCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); // check whether something needs to be done @@ -237,7 +237,7 @@ void castor::db::cnv::DbBaseAddressCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -384,7 +384,7 @@ void castor::db::cnv::DbBaseAddressCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbBaseAddressCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); // check whether something needs to be done @@ -425,7 +425,7 @@ void castor::db::cnv::DbBaseAddressCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbBaseAddressCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); // check whether something needs to be done @@ -460,7 +460,7 @@ void castor::db::cnv::DbBaseAddressCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbBaseAddressCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -502,7 +502,7 @@ castor::IObject* castor::db::cnv::DbBaseAddressCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbBaseAddressCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -554,7 +554,7 @@ castor::db::cnv::DbBaseAddressCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbBaseAddressCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbBaseAddressCnv.hpp b/castor/db/cnv/DbBaseAddressCnv.hpp index 83865029d43772bb88fbede164a64a015ec3587b..77c77027d3940fc458233b69c44e795a90fd9346 100644 --- a/castor/db/cnv/DbBaseAddressCnv.hpp +++ b/castor/db/cnv/DbBaseAddressCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbChangePrivilegeCnv.cpp b/castor/db/cnv/DbChangePrivilegeCnv.cpp index ac9703dc9485c172ba749bc859fdea93bc5968cb..4a544b371021453f1ce9ce0d5bda38dd0dd84f3c 100644 --- a/castor/db/cnv/DbChangePrivilegeCnv.cpp +++ b/castor/db/cnv/DbChangePrivilegeCnv.cpp @@ -203,7 +203,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); try { @@ -242,7 +242,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillRepSvcClass(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -274,7 +274,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillRepSvcClass(castor::bwlist::Chan // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillRepIClient(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -289,7 +289,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillRepIClient(castor::bwlist::Chang // fillRepBWUser //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillRepBWUser(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectBWUserStatement) { m_selectBWUserStatement = createStatement(s_selectBWUserStatementString); @@ -342,7 +342,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillRepBWUser(castor::bwlist::Change // fillRepRequestType //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillRepRequestType(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectRequestTypeStatement) { m_selectRequestTypeStatement = createStatement(s_selectRequestTypeStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); switch (type) { @@ -430,7 +430,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillObjSvcClass(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -468,7 +468,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillObjSvcClass(castor::bwlist::Chan // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillObjIClient(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -506,7 +506,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillObjIClient(castor::bwlist::Chang // fillObjBWUser //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillObjBWUser(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectBWUserStatement) { m_selectBWUserStatement = createStatement(s_selectBWUserStatementString); @@ -558,7 +558,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::fillObjBWUser(castor::bwlist::Change // fillObjRequestType //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::fillObjRequestType(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectRequestTypeStatement) { m_selectRequestTypeStatement = createStatement(s_selectRequestTypeStatementString); @@ -613,7 +613,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); // check whether something needs to be done @@ -690,7 +690,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -1092,7 +1092,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbChangePrivilegeCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); // check whether something needs to be done @@ -1141,7 +1141,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbChangePrivilegeCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); // check whether something needs to be done @@ -1179,7 +1179,7 @@ void castor::db::cnv::DbChangePrivilegeCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbChangePrivilegeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1230,7 +1230,7 @@ castor::IObject* castor::db::cnv::DbChangePrivilegeCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbChangePrivilegeCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1291,7 +1291,7 @@ castor::db::cnv::DbChangePrivilegeCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbChangePrivilegeCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbChangePrivilegeCnv.hpp b/castor/db/cnv/DbChangePrivilegeCnv.hpp index 063a5725f04dc110a6a722e835a42ff411d22dd0..05609af602adac659ddb1d88a3cf465164023437 100644 --- a/castor/db/cnv/DbChangePrivilegeCnv.hpp +++ b/castor/db/cnv/DbChangePrivilegeCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type BWUser refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepBWUser(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type RequestType refered by a given object. @@ -221,7 +221,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepRequestType(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -233,7 +233,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -241,7 +241,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -249,7 +249,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type BWUser refered by a given object. @@ -257,7 +257,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjBWUser(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type RequestType refered by a given @@ -266,7 +266,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjRequestType(castor::bwlist::ChangePrivilege* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbClientCnv.cpp b/castor/db/cnv/DbClientCnv.cpp index 3157afc1622098492c37bb41f3746f358d69075b..87ac78420a3ee5d06261a42425631533d75d83b8 100644 --- a/castor/db/cnv/DbClientCnv.cpp +++ b/castor/db/cnv/DbClientCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbClientCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbClientCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbClientCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); // check whether something needs to be done @@ -238,7 +238,7 @@ void castor::db::cnv::DbClientCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -380,7 +380,7 @@ void castor::db::cnv::DbClientCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbClientCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); // check whether something needs to be done @@ -421,7 +421,7 @@ void castor::db::cnv::DbClientCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbClientCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); // check whether something needs to be done @@ -456,7 +456,7 @@ void castor::db::cnv::DbClientCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbClientCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -498,7 +498,7 @@ castor::IObject* castor::db::cnv::DbClientCnv::createObj(castor::IAddress* addre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbClientCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -550,7 +550,7 @@ castor::db::cnv::DbClientCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbClientCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbClientCnv.hpp b/castor/db/cnv/DbClientCnv.hpp index 266f1a2068765ec615405943aa7bd767386ecf47..cb6d4658d7957cfa48ec3f4ba4996d011694c3a2 100644 --- a/castor/db/cnv/DbClientCnv.hpp +++ b/castor/db/cnv/DbClientCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbClientIdentificationCnv.cpp b/castor/db/cnv/DbClientIdentificationCnv.cpp index eadfa22efb27718f3441e4b3e658234e47e35c56..819c435bde8721fe3319ab98603a8204a8d2151f 100644 --- a/castor/db/cnv/DbClientIdentificationCnv.cpp +++ b/castor/db/cnv/DbClientIdentificationCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbClientIdentificationCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbClientIdentificationCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbClientIdentificationCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); // check whether something needs to be done @@ -242,7 +242,7 @@ void castor::db::cnv::DbClientIdentificationCnv::bulkCreateRep(castor::IAddress* std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -432,7 +432,7 @@ void castor::db::cnv::DbClientIdentificationCnv::bulkCreateRep(castor::IAddress* void castor::db::cnv::DbClientIdentificationCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); // check whether something needs to be done @@ -475,7 +475,7 @@ void castor::db::cnv::DbClientIdentificationCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbClientIdentificationCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); // check whether something needs to be done @@ -510,7 +510,7 @@ void castor::db::cnv::DbClientIdentificationCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbClientIdentificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -554,7 +554,7 @@ castor::IObject* castor::db::cnv::DbClientIdentificationCnv::createObj(castor::I //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbClientIdentificationCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -608,7 +608,7 @@ castor::db::cnv::DbClientIdentificationCnv::bulkCreateObj(castor::IAddress* addr // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbClientIdentificationCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbClientIdentificationCnv.hpp b/castor/db/cnv/DbClientIdentificationCnv.hpp index 8e8ec3026b49a168aeacdd69a4c65bc51a2db659..3f093e0bb0a3097cab7b9a9a1ce3f3cddafeeb50 100644 --- a/castor/db/cnv/DbClientIdentificationCnv.hpp +++ b/castor/db/cnv/DbClientIdentificationCnv.hpp @@ -88,7 +88,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -106,7 +106,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -120,7 +120,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -134,7 +134,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -146,7 +146,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -158,7 +158,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -182,7 +182,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -194,7 +194,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbDeviceGroupNameCnv.cpp b/castor/db/cnv/DbDeviceGroupNameCnv.cpp index 0ed4f4ae0b571cc570d8377a0f9f61e851390531..392ca2357a41f679ea1d98c6c67a0525d68f8fd5 100644 --- a/castor/db/cnv/DbDeviceGroupNameCnv.cpp +++ b/castor/db/cnv/DbDeviceGroupNameCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); // check whether something needs to be done @@ -234,7 +234,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -348,7 +348,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbDeviceGroupNameCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); // check whether something needs to be done @@ -387,7 +387,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbDeviceGroupNameCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); // check whether something needs to be done @@ -422,7 +422,7 @@ void castor::db::cnv::DbDeviceGroupNameCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbDeviceGroupNameCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -462,7 +462,7 @@ castor::IObject* castor::db::cnv::DbDeviceGroupNameCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbDeviceGroupNameCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -512,7 +512,7 @@ castor::db::cnv::DbDeviceGroupNameCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbDeviceGroupNameCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbDeviceGroupNameCnv.hpp b/castor/db/cnv/DbDeviceGroupNameCnv.hpp index 0c5b36f254bdc2c54013fb32c1cefe60d77b58d1..c8fef1dc883206481756d90a744a3ab70eb29259 100644 --- a/castor/db/cnv/DbDeviceGroupNameCnv.hpp +++ b/castor/db/cnv/DbDeviceGroupNameCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbDiskPoolQueryCnv.cpp b/castor/db/cnv/DbDiskPoolQueryCnv.cpp index 65944a66bb4da87c3fc5e4aac7b6ad703c523307..2bdbab937f10580b97fb785417b1593c6ffdc448 100644 --- a/castor/db/cnv/DbDiskPoolQueryCnv.cpp +++ b/castor/db/cnv/DbDiskPoolQueryCnv.cpp @@ -164,7 +164,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); try { @@ -197,7 +197,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbDiskPoolQueryCnv::fillRepSvcClass(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -229,7 +229,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::fillRepSvcClass(castor::query::DiskPoo // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbDiskPoolQueryCnv::fillRepIClient(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -247,7 +247,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); switch (type) { @@ -273,7 +273,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbDiskPoolQueryCnv::fillObjSvcClass(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -311,7 +311,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::fillObjSvcClass(castor::query::DiskPoo // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbDiskPoolQueryCnv::fillObjIClient(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -352,7 +352,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); // check whether something needs to be done @@ -431,7 +431,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -857,7 +857,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbDiskPoolQueryCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); // check whether something needs to be done @@ -907,7 +907,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbDiskPoolQueryCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); // check whether something needs to be done @@ -945,7 +945,7 @@ void castor::db::cnv::DbDiskPoolQueryCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbDiskPoolQueryCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -997,7 +997,7 @@ castor::IObject* castor::db::cnv::DbDiskPoolQueryCnv::createObj(castor::IAddress //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbDiskPoolQueryCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1059,7 +1059,7 @@ castor::db::cnv::DbDiskPoolQueryCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbDiskPoolQueryCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbDiskPoolQueryCnv.hpp b/castor/db/cnv/DbDiskPoolQueryCnv.hpp index 1198a6200f14639fdea7299dbc745785c8e7d9c9..cdecbb35a8a06e8181ed8c2cc51663a3e9b95b15 100644 --- a/castor/db/cnv/DbDiskPoolQueryCnv.hpp +++ b/castor/db/cnv/DbDiskPoolQueryCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::query::DiskPoolQuery* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbFileClassCnv.cpp b/castor/db/cnv/DbFileClassCnv.cpp index 30379802f786dad522ac8cf0b0ea9f026046a960..c112a6542f137aa3ae13caf0dde7569a4f34d58a 100644 --- a/castor/db/cnv/DbFileClassCnv.cpp +++ b/castor/db/cnv/DbFileClassCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbFileClassCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FileClass* obj = dynamic_cast<castor::stager::FileClass*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbFileClassCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FileClass* obj = dynamic_cast<castor::stager::FileClass*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbFileClassCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::FileClass* obj = dynamic_cast<castor::stager::FileClass*>(object); // check whether something needs to be done @@ -236,7 +236,7 @@ void castor::db::cnv::DbFileClassCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -364,7 +364,7 @@ void castor::db::cnv::DbFileClassCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbFileClassCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FileClass* obj = dynamic_cast<castor::stager::FileClass*>(object); // check whether something needs to be done @@ -404,7 +404,7 @@ void castor::db::cnv::DbFileClassCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbFileClassCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FileClass* obj = dynamic_cast<castor::stager::FileClass*>(object); // check whether something needs to be done @@ -439,7 +439,7 @@ void castor::db::cnv::DbFileClassCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbFileClassCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -480,7 +480,7 @@ castor::IObject* castor::db::cnv::DbFileClassCnv::createObj(castor::IAddress* ad //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbFileClassCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -531,7 +531,7 @@ castor::db::cnv::DbFileClassCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbFileClassCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbFileClassCnv.hpp b/castor/db/cnv/DbFileClassCnv.hpp index 4682b3eb0ecde5026b00a6e0251d208bfe79e3ce..0b56eaf11d3979e14b2626d8aa1d840ca2bd6545 100644 --- a/castor/db/cnv/DbFileClassCnv.hpp +++ b/castor/db/cnv/DbFileClassCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbFiles2DeleteCnv.cpp b/castor/db/cnv/DbFiles2DeleteCnv.cpp index aa2f840a9a1be2e38422120f4a71db7b5269c309..b385eb6192146c515df27b6b2e95aa9d1b50691f 100644 --- a/castor/db/cnv/DbFiles2DeleteCnv.cpp +++ b/castor/db/cnv/DbFiles2DeleteCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFiles2DeleteCnv::fillRepSvcClass(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::fillRepSvcClass(castor::stager::Files2D // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFiles2DeleteCnv::fillRepIClient(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFiles2DeleteCnv::fillObjSvcClass(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::fillObjSvcClass(castor::stager::Files2D // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFiles2DeleteCnv::fillObjIClient(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); // check whether something needs to be done @@ -428,7 +428,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -835,7 +835,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbFiles2DeleteCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); // check whether something needs to be done @@ -884,7 +884,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbFiles2DeleteCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); // check whether something needs to be done @@ -922,7 +922,7 @@ void castor::db::cnv::DbFiles2DeleteCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbFiles2DeleteCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -973,7 +973,7 @@ castor::IObject* castor::db::cnv::DbFiles2DeleteCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbFiles2DeleteCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1034,7 +1034,7 @@ castor::db::cnv::DbFiles2DeleteCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbFiles2DeleteCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbFiles2DeleteCnv.hpp b/castor/db/cnv/DbFiles2DeleteCnv.hpp index be80c9b363f2569a7bdb4efab445374e04b82f1a..93e9c76317567a4db8db4672498bbdb19a81bfdc 100644 --- a/castor/db/cnv/DbFiles2DeleteCnv.hpp +++ b/castor/db/cnv/DbFiles2DeleteCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::Files2Delete* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbFilesDeletedCnv.cpp b/castor/db/cnv/DbFilesDeletedCnv.cpp index b91a486a695d112cfc067322a34643b96376d090..faf5bed19a362878cf28776a13d49f12790a06c9 100644 --- a/castor/db/cnv/DbFilesDeletedCnv.cpp +++ b/castor/db/cnv/DbFilesDeletedCnv.cpp @@ -184,7 +184,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); try { @@ -220,7 +220,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillRep(castor::IAddress*, // fillRepGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::fillRepGCFile(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -273,7 +273,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillRepGCFile(castor::stager::FilesDele // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::fillRepSvcClass(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -305,7 +305,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillRepSvcClass(castor::stager::FilesDe // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::fillRepIClient(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); switch (type) { @@ -352,7 +352,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillObj(castor::IAddress*, // fillObjGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::fillObjGCFile(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -404,7 +404,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillObjGCFile(castor::stager::FilesDele // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::fillObjSvcClass(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbFilesDeletedCnv::fillObjSvcClass(castor::stager::FilesDe // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::fillObjIClient(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -483,7 +483,7 @@ void castor::db::cnv::DbFilesDeletedCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); // check whether something needs to be done @@ -558,7 +558,7 @@ void castor::db::cnv::DbFilesDeletedCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -941,7 +941,7 @@ void castor::db::cnv::DbFilesDeletedCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbFilesDeletedCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); // check whether something needs to be done @@ -989,7 +989,7 @@ void castor::db::cnv::DbFilesDeletedCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbFilesDeletedCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); // check whether something needs to be done @@ -1032,7 +1032,7 @@ void castor::db::cnv::DbFilesDeletedCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbFilesDeletedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1082,7 +1082,7 @@ castor::IObject* castor::db::cnv::DbFilesDeletedCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbFilesDeletedCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1142,7 +1142,7 @@ castor::db::cnv::DbFilesDeletedCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletedCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbFilesDeletedCnv.hpp b/castor/db/cnv/DbFilesDeletedCnv.hpp index f9116585115ed7dc9d796b883228565dd53fcf94..b0712723ab80ea631f2762cd659f3ffe11baa7e9 100644 --- a/castor/db/cnv/DbFilesDeletedCnv.hpp +++ b/castor/db/cnv/DbFilesDeletedCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type GCFile refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepGCFile(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type GCFile refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjGCFile(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -241,7 +241,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -249,7 +249,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::FilesDeleted* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbFilesDeletionFailedCnv.cpp b/castor/db/cnv/DbFilesDeletionFailedCnv.cpp index f8a661d8b3444959fa4b7f7b961a1eed3cff3a20..f9f9d6885a476b3f3fd35e6d20873cffcf7e3e33 100644 --- a/castor/db/cnv/DbFilesDeletionFailedCnv.cpp +++ b/castor/db/cnv/DbFilesDeletionFailedCnv.cpp @@ -184,7 +184,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); try { @@ -220,7 +220,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRep(castor::IAddress*, // fillRepGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRepGCFile(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -273,7 +273,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRepGCFile(castor::stager::Fi // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRepSvcClass(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -305,7 +305,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRepSvcClass(castor::stager:: // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::fillRepIClient(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); switch (type) { @@ -352,7 +352,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObj(castor::IAddress*, // fillObjGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObjGCFile(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -404,7 +404,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObjGCFile(castor::stager::Fi // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObjSvcClass(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObjSvcClass(castor::stager:: // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::fillObjIClient(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -483,7 +483,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); // check whether something needs to be done @@ -558,7 +558,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -941,7 +941,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbFilesDeletionFailedCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); // check whether something needs to be done @@ -989,7 +989,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbFilesDeletionFailedCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); // check whether something needs to be done @@ -1032,7 +1032,7 @@ void castor::db::cnv::DbFilesDeletionFailedCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbFilesDeletionFailedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1082,7 +1082,7 @@ castor::IObject* castor::db::cnv::DbFilesDeletionFailedCnv::createObj(castor::IA //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbFilesDeletionFailedCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1142,7 +1142,7 @@ castor::db::cnv::DbFilesDeletionFailedCnv::bulkCreateObj(castor::IAddress* addre // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbFilesDeletionFailedCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbFilesDeletionFailedCnv.hpp b/castor/db/cnv/DbFilesDeletionFailedCnv.hpp index fbe8d7ec883111b2d5974ea10bead4e3c0957367..444f3540cf8bbd8d32e476d4056b99c17de40cbf 100644 --- a/castor/db/cnv/DbFilesDeletionFailedCnv.hpp +++ b/castor/db/cnv/DbFilesDeletionFailedCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type GCFile refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepGCFile(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -226,7 +226,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type GCFile refered by a given object. @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjGCFile(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -242,7 +242,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -250,7 +250,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::FilesDeletionFailed* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbFirstByteWrittenCnv.cpp b/castor/db/cnv/DbFirstByteWrittenCnv.cpp index 104dd7d8c0d061c5c288c4f65201c417fb6d7596..6f4d618124ef57b7309626762ed81536f187fdf1 100644 --- a/castor/db/cnv/DbFirstByteWrittenCnv.cpp +++ b/castor/db/cnv/DbFirstByteWrittenCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFirstByteWrittenCnv::fillRepSvcClass(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::fillRepSvcClass(castor::stager::Fir // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFirstByteWrittenCnv::fillRepIClient(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbFirstByteWrittenCnv::fillObjSvcClass(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::fillObjSvcClass(castor::stager::Fir // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbFirstByteWrittenCnv::fillObjIClient(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); // check whether something needs to be done @@ -432,7 +432,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -877,7 +877,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbFirstByteWrittenCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); // check whether something needs to be done @@ -928,7 +928,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbFirstByteWrittenCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); // check whether something needs to be done @@ -966,7 +966,7 @@ void castor::db::cnv::DbFirstByteWrittenCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbFirstByteWrittenCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1019,7 +1019,7 @@ castor::IObject* castor::db::cnv::DbFirstByteWrittenCnv::createObj(castor::IAddr //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbFirstByteWrittenCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1082,7 +1082,7 @@ castor::db::cnv::DbFirstByteWrittenCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbFirstByteWrittenCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbFirstByteWrittenCnv.hpp b/castor/db/cnv/DbFirstByteWrittenCnv.hpp index 9df183ec3b4ddd621de147c391d5217f2843af29..f28041c4bbf23dd6991a1a2e29e75558ef016298 100644 --- a/castor/db/cnv/DbFirstByteWrittenCnv.hpp +++ b/castor/db/cnv/DbFirstByteWrittenCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -218,7 +218,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -226,7 +226,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::FirstByteWritten* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbGCFileCnv.cpp b/castor/db/cnv/DbGCFileCnv.cpp index a53c4f99af2f5a5ba383ad9aed0a9e4b9d21b76f..1d6967c446a21fc46f12d2a54682abdceeb4664f 100644 --- a/castor/db/cnv/DbGCFileCnv.cpp +++ b/castor/db/cnv/DbGCFileCnv.cpp @@ -144,7 +144,7 @@ void castor::db::cnv::DbGCFileCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); try { @@ -174,7 +174,7 @@ void castor::db::cnv::DbGCFileCnv::fillRep(castor::IAddress*, // fillRepGCFileList //------------------------------------------------------------------------------ void castor::db::cnv::DbGCFileCnv::fillRepGCFileList(castor::stager::GCFile* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateGCFileListStatement) { m_updateGCFileListStatement = createStatement(s_updateGCFileListStatementString); @@ -192,7 +192,7 @@ void castor::db::cnv::DbGCFileCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); switch (type) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbGCFileCnv::fillObj(castor::IAddress*, // fillObjGCFileList //------------------------------------------------------------------------------ void castor::db::cnv::DbGCFileCnv::fillObjGCFileList(castor::stager::GCFile* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -258,7 +258,7 @@ void castor::db::cnv::DbGCFileCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); // check whether something needs to be done @@ -303,7 +303,7 @@ void castor::db::cnv::DbGCFileCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -407,7 +407,7 @@ void castor::db::cnv::DbGCFileCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbGCFileCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); // check whether something needs to be done @@ -445,7 +445,7 @@ void castor::db::cnv::DbGCFileCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbGCFileCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); // check whether something needs to be done @@ -480,7 +480,7 @@ void castor::db::cnv::DbGCFileCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbGCFileCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -519,7 +519,7 @@ castor::IObject* castor::db::cnv::DbGCFileCnv::createObj(castor::IAddress* addre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbGCFileCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -568,7 +568,7 @@ castor::db::cnv::DbGCFileCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbGCFileCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbGCFileCnv.hpp b/castor/db/cnv/DbGCFileCnv.hpp index a3b8273d3c627d05062c333c38d54ade4865127f..97b186fc8be1b47880eea4c3a9696848eb17b39f 100644 --- a/castor/db/cnv/DbGCFileCnv.hpp +++ b/castor/db/cnv/DbGCFileCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type GCFileList refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepGCFileList(castor::stager::GCFile* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -209,7 +209,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type GCFileList refered by a given @@ -218,7 +218,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjGCFileList(castor::stager::GCFile* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbGCLocalFileCnv.cpp b/castor/db/cnv/DbGCLocalFileCnv.cpp index cd5be777d4f9a2d63c23badd8490930a8c76105c..d45c0a2c63a78653b42c9301accb6ecaf99de9b8 100644 --- a/castor/db/cnv/DbGCLocalFileCnv.cpp +++ b/castor/db/cnv/DbGCLocalFileCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbGCLocalFileCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbGCLocalFileCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbGCLocalFileCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); // check whether something needs to be done @@ -247,7 +247,7 @@ void castor::db::cnv::DbGCLocalFileCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -466,7 +466,7 @@ void castor::db::cnv::DbGCLocalFileCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbGCLocalFileCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); // check whether something needs to be done @@ -510,7 +510,7 @@ void castor::db::cnv::DbGCLocalFileCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbGCLocalFileCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); // check whether something needs to be done @@ -545,7 +545,7 @@ void castor::db::cnv::DbGCLocalFileCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbGCLocalFileCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -592,7 +592,7 @@ castor::IObject* castor::db::cnv::DbGCLocalFileCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbGCLocalFileCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -649,7 +649,7 @@ castor::db::cnv::DbGCLocalFileCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbGCLocalFileCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbGCLocalFileCnv.hpp b/castor/db/cnv/DbGCLocalFileCnv.hpp index 182276f99dd1b59ad54e490f405d0d3255df9ebb..54c1c75ca853fc8d2a8f30d1491dea463b12fe7c 100644 --- a/castor/db/cnv/DbGCLocalFileCnv.hpp +++ b/castor/db/cnv/DbGCLocalFileCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbGetUpdateDoneCnv.cpp b/castor/db/cnv/DbGetUpdateDoneCnv.cpp index 7cc0ec3156473ac90705aa63bd99b8df9fe82a6c..e57f351f7e9d004e7ce7387034b52db519ad1407 100644 --- a/castor/db/cnv/DbGetUpdateDoneCnv.cpp +++ b/castor/db/cnv/DbGetUpdateDoneCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateDoneCnv::fillRepSvcClass(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::fillRepSvcClass(castor::stager::GetUpd // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateDoneCnv::fillRepIClient(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateDoneCnv::fillObjSvcClass(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::fillObjSvcClass(castor::stager::GetUpd // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateDoneCnv::fillObjIClient(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); // check whether something needs to be done @@ -432,7 +432,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -877,7 +877,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbGetUpdateDoneCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); // check whether something needs to be done @@ -928,7 +928,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbGetUpdateDoneCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); // check whether something needs to be done @@ -966,7 +966,7 @@ void castor::db::cnv::DbGetUpdateDoneCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbGetUpdateDoneCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1019,7 +1019,7 @@ castor::IObject* castor::db::cnv::DbGetUpdateDoneCnv::createObj(castor::IAddress //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbGetUpdateDoneCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1082,7 +1082,7 @@ castor::db::cnv::DbGetUpdateDoneCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateDoneCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbGetUpdateDoneCnv.hpp b/castor/db/cnv/DbGetUpdateDoneCnv.hpp index 773ddee009b3f0d1b2968b44fb3a84a08a696959..840502699e692a0c58da87686b94aae8c64b7199 100644 --- a/castor/db/cnv/DbGetUpdateDoneCnv.hpp +++ b/castor/db/cnv/DbGetUpdateDoneCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::GetUpdateDone* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbGetUpdateFailedCnv.cpp b/castor/db/cnv/DbGetUpdateFailedCnv.cpp index 17318c45938bb522369430cd9fb1765464aa5492..d4c78d3ef1136dd8a8b99d5f9487146eaee7c433 100644 --- a/castor/db/cnv/DbGetUpdateFailedCnv.cpp +++ b/castor/db/cnv/DbGetUpdateFailedCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateFailedCnv::fillRepSvcClass(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::fillRepSvcClass(castor::stager::GetU // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateFailedCnv::fillRepIClient(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateFailedCnv::fillObjSvcClass(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::fillObjSvcClass(castor::stager::GetU // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateFailedCnv::fillObjIClient(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); // check whether something needs to be done @@ -432,7 +432,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -877,7 +877,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbGetUpdateFailedCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); // check whether something needs to be done @@ -928,7 +928,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbGetUpdateFailedCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); // check whether something needs to be done @@ -966,7 +966,7 @@ void castor::db::cnv::DbGetUpdateFailedCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbGetUpdateFailedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1019,7 +1019,7 @@ castor::IObject* castor::db::cnv::DbGetUpdateFailedCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbGetUpdateFailedCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1082,7 +1082,7 @@ castor::db::cnv::DbGetUpdateFailedCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateFailedCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbGetUpdateFailedCnv.hpp b/castor/db/cnv/DbGetUpdateFailedCnv.hpp index 95f12872e8f752479e0f3066bfbf54fd6996d5b8..0e7831c6393599cfce38a4fd94d4e2c67bd03470 100644 --- a/castor/db/cnv/DbGetUpdateFailedCnv.hpp +++ b/castor/db/cnv/DbGetUpdateFailedCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::GetUpdateFailed* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbGetUpdateStartRequestCnv.cpp b/castor/db/cnv/DbGetUpdateStartRequestCnv.cpp index 6a350f1d7ac772398c0b423971dd640b2fd08d14..e46cade9da379579b62b93aa609c90131042db1c 100644 --- a/castor/db/cnv/DbGetUpdateStartRequestCnv.cpp +++ b/castor/db/cnv/DbGetUpdateStartRequestCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillRepSvcClass(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillRepSvcClass(castor::stager // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillRepIClient(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillObjSvcClass(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillObjSvcClass(castor::stager // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateStartRequestCnv::fillObjIClient(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); // check whether something needs to be done @@ -436,7 +436,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::bulkCreateRep(castor::IAddress std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -929,7 +929,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::bulkCreateRep(castor::IAddress void castor::db::cnv::DbGetUpdateStartRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); // check whether something needs to be done @@ -982,7 +982,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbGetUpdateStartRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); // check whether something needs to be done @@ -1020,7 +1020,7 @@ void castor::db::cnv::DbGetUpdateStartRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbGetUpdateStartRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1075,7 +1075,7 @@ castor::IObject* castor::db::cnv::DbGetUpdateStartRequestCnv::createObj(castor:: //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbGetUpdateStartRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1140,7 +1140,7 @@ castor::db::cnv::DbGetUpdateStartRequestCnv::bulkCreateObj(castor::IAddress* add // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbGetUpdateStartRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbGetUpdateStartRequestCnv.hpp b/castor/db/cnv/DbGetUpdateStartRequestCnv.hpp index 636dafafca7abd41e4b1765b603f200862d8c611..41a1c4b171960513921322c985aa55f6869246f5 100644 --- a/castor/db/cnv/DbGetUpdateStartRequestCnv.hpp +++ b/castor/db/cnv/DbGetUpdateStartRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -218,7 +218,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -226,7 +226,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::GetUpdateStartRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbListPrivilegesCnv.cpp b/castor/db/cnv/DbListPrivilegesCnv.cpp index a9907bf2458cc9942096ebafb9b91e5b098ac1ed..174b1034d0a44f0435cca88b78cd1bf0412ade7b 100644 --- a/castor/db/cnv/DbListPrivilegesCnv.cpp +++ b/castor/db/cnv/DbListPrivilegesCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbListPrivilegesCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbListPrivilegesCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbListPrivilegesCnv::fillRepSvcClass(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbListPrivilegesCnv::fillRepSvcClass(castor::bwlist::ListP // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbListPrivilegesCnv::fillRepIClient(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbListPrivilegesCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbListPrivilegesCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbListPrivilegesCnv::fillObjSvcClass(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbListPrivilegesCnv::fillObjSvcClass(castor::bwlist::ListP // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbListPrivilegesCnv::fillObjIClient(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbListPrivilegesCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); // check whether something needs to be done @@ -432,7 +432,7 @@ void castor::db::cnv::DbListPrivilegesCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -872,7 +872,7 @@ void castor::db::cnv::DbListPrivilegesCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbListPrivilegesCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); // check whether something needs to be done @@ -923,7 +923,7 @@ void castor::db::cnv::DbListPrivilegesCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbListPrivilegesCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); // check whether something needs to be done @@ -961,7 +961,7 @@ void castor::db::cnv::DbListPrivilegesCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbListPrivilegesCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1014,7 +1014,7 @@ castor::IObject* castor::db::cnv::DbListPrivilegesCnv::createObj(castor::IAddres //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbListPrivilegesCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1077,7 +1077,7 @@ castor::db::cnv::DbListPrivilegesCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbListPrivilegesCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbListPrivilegesCnv.hpp b/castor/db/cnv/DbListPrivilegesCnv.hpp index c34f46490f8269f14b6e25e962219d574ca8ed7c..489dcb32f3f8f093300a9c5177cd509d0703a282 100644 --- a/castor/db/cnv/DbListPrivilegesCnv.hpp +++ b/castor/db/cnv/DbListPrivilegesCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::bwlist::ListPrivileges* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbMoverCloseRequestCnv.cpp b/castor/db/cnv/DbMoverCloseRequestCnv.cpp index 5e10b1b45311e5bbed64a56efbdf32816f8adb4a..456bbdb8c87c968f51dcd320401894c916eef8bf 100644 --- a/castor/db/cnv/DbMoverCloseRequestCnv.cpp +++ b/castor/db/cnv/DbMoverCloseRequestCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbMoverCloseRequestCnv::fillRepSvcClass(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::fillRepSvcClass(castor::stager::Mo // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbMoverCloseRequestCnv::fillRepIClient(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbMoverCloseRequestCnv::fillObjSvcClass(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::fillObjSvcClass(castor::stager::Mo // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbMoverCloseRequestCnv::fillObjIClient(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); // check whether something needs to be done @@ -440,7 +440,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -971,7 +971,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbMoverCloseRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); // check whether something needs to be done @@ -1026,7 +1026,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbMoverCloseRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); // check whether something needs to be done @@ -1064,7 +1064,7 @@ void castor::db::cnv::DbMoverCloseRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbMoverCloseRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1121,7 +1121,7 @@ castor::IObject* castor::db::cnv::DbMoverCloseRequestCnv::createObj(castor::IAdd //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbMoverCloseRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1188,7 +1188,7 @@ castor::db::cnv::DbMoverCloseRequestCnv::bulkCreateObj(castor::IAddress* address // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbMoverCloseRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbMoverCloseRequestCnv.hpp b/castor/db/cnv/DbMoverCloseRequestCnv.hpp index f3a5e4d490947c5b8dd6b26725d56e64627ca2b8..9d88233c706326c8fa042a42da3e9528fd4ae927 100644 --- a/castor/db/cnv/DbMoverCloseRequestCnv.hpp +++ b/castor/db/cnv/DbMoverCloseRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -218,7 +218,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -226,7 +226,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::MoverCloseRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbNsFileIdCnv.cpp b/castor/db/cnv/DbNsFileIdCnv.cpp index 4990551a8726400d382d82585f1ca684caa1d502..0188b67318c1408f343b791e6317b6286ed0f3c4 100644 --- a/castor/db/cnv/DbNsFileIdCnv.cpp +++ b/castor/db/cnv/DbNsFileIdCnv.cpp @@ -150,7 +150,7 @@ void castor::db::cnv::DbNsFileIdCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); try { @@ -180,7 +180,7 @@ void castor::db::cnv::DbNsFileIdCnv::fillRep(castor::IAddress*, // fillRepStageAbortRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFileIdCnv::fillRepStageAbortRequest(castor::stager::NsFileId* obj) - throw (castor::exception::Exception) { + { if (0 != obj->request()) { // Check checkStageAbortRequestExist statement if (0 == m_checkStageAbortRequestExistStatement) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbNsFileIdCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); switch (type) { @@ -238,7 +238,7 @@ void castor::db::cnv::DbNsFileIdCnv::fillObj(castor::IAddress*, // fillObjStageAbortRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFileIdCnv::fillObjStageAbortRequest(castor::stager::NsFileId* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -281,7 +281,7 @@ void castor::db::cnv::DbNsFileIdCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); // check whether something needs to be done @@ -328,7 +328,7 @@ void castor::db::cnv::DbNsFileIdCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -456,7 +456,7 @@ void castor::db::cnv::DbNsFileIdCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbNsFileIdCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); // check whether something needs to be done @@ -495,7 +495,7 @@ void castor::db::cnv::DbNsFileIdCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbNsFileIdCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); // check whether something needs to be done @@ -530,7 +530,7 @@ void castor::db::cnv::DbNsFileIdCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbNsFileIdCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -570,7 +570,7 @@ castor::IObject* castor::db::cnv::DbNsFileIdCnv::createObj(castor::IAddress* add //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbNsFileIdCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -620,7 +620,7 @@ castor::db::cnv::DbNsFileIdCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFileIdCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbNsFileIdCnv.hpp b/castor/db/cnv/DbNsFileIdCnv.hpp index 56831a7f357a8b0fc5582113d283ae17e86f2657..9e5b01a21dcf4b88cb51f46c6fc59b2ca286a428 100644 --- a/castor/db/cnv/DbNsFileIdCnv.hpp +++ b/castor/db/cnv/DbNsFileIdCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type StageAbortRequest refered by a given @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepStageAbortRequest(castor::stager::NsFileId* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -210,7 +210,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type StageAbortRequest refered by a given @@ -219,7 +219,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjStageAbortRequest(castor::stager::NsFileId* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbNsFilesDeletedCnv.cpp b/castor/db/cnv/DbNsFilesDeletedCnv.cpp index de0f1cd024d7e66752e2dbf6b01121d6671839ea..8da541c2c93370f546585dd96dd9755a11f0dfb0 100644 --- a/castor/db/cnv/DbNsFilesDeletedCnv.cpp +++ b/castor/db/cnv/DbNsFilesDeletedCnv.cpp @@ -184,7 +184,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); try { @@ -220,7 +220,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillRep(castor::IAddress*, // fillRepGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::fillRepGCFile(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -273,7 +273,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillRepGCFile(castor::stager::NsFiles // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::fillRepSvcClass(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -305,7 +305,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillRepSvcClass(castor::stager::NsFil // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::fillRepIClient(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); switch (type) { @@ -352,7 +352,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillObj(castor::IAddress*, // fillObjGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::fillObjGCFile(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -404,7 +404,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillObjGCFile(castor::stager::NsFiles // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::fillObjSvcClass(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::fillObjSvcClass(castor::stager::NsFil // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::fillObjIClient(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -483,7 +483,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); // check whether something needs to be done @@ -560,7 +560,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -967,7 +967,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbNsFilesDeletedCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); // check whether something needs to be done @@ -1016,7 +1016,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbNsFilesDeletedCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); // check whether something needs to be done @@ -1059,7 +1059,7 @@ void castor::db::cnv::DbNsFilesDeletedCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbNsFilesDeletedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1110,7 +1110,7 @@ castor::IObject* castor::db::cnv::DbNsFilesDeletedCnv::createObj(castor::IAddres //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbNsFilesDeletedCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1171,7 +1171,7 @@ castor::db::cnv::DbNsFilesDeletedCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbNsFilesDeletedCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbNsFilesDeletedCnv.hpp b/castor/db/cnv/DbNsFilesDeletedCnv.hpp index b5aa18667b592ce6e1f7254b458a4f1e364aef5f..2bbe4363cf912a97120e4a09cf9699991a17eb0f 100644 --- a/castor/db/cnv/DbNsFilesDeletedCnv.hpp +++ b/castor/db/cnv/DbNsFilesDeletedCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type GCFile refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepGCFile(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type GCFile refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjGCFile(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -241,7 +241,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -249,7 +249,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::NsFilesDeleted* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbPutFailedCnv.cpp b/castor/db/cnv/DbPutFailedCnv.cpp index 611e1b1389b5833a02e8fd590a82085eee473cc1..bfb3aff8288c38b1e073b8caef2fe4fdc2ea268b 100644 --- a/castor/db/cnv/DbPutFailedCnv.cpp +++ b/castor/db/cnv/DbPutFailedCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbPutFailedCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbPutFailedCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbPutFailedCnv::fillRepSvcClass(castor::stager::PutFailed* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbPutFailedCnv::fillRepSvcClass(castor::stager::PutFailed* // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbPutFailedCnv::fillRepIClient(castor::stager::PutFailed* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbPutFailedCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbPutFailedCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbPutFailedCnv::fillObjSvcClass(castor::stager::PutFailed* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbPutFailedCnv::fillObjSvcClass(castor::stager::PutFailed* // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbPutFailedCnv::fillObjIClient(castor::stager::PutFailed* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbPutFailedCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); // check whether something needs to be done @@ -432,7 +432,7 @@ void castor::db::cnv::DbPutFailedCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -877,7 +877,7 @@ void castor::db::cnv::DbPutFailedCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbPutFailedCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); // check whether something needs to be done @@ -928,7 +928,7 @@ void castor::db::cnv::DbPutFailedCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbPutFailedCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); // check whether something needs to be done @@ -966,7 +966,7 @@ void castor::db::cnv::DbPutFailedCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbPutFailedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1019,7 +1019,7 @@ castor::IObject* castor::db::cnv::DbPutFailedCnv::createObj(castor::IAddress* ad //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbPutFailedCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1082,7 +1082,7 @@ castor::db::cnv::DbPutFailedCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbPutFailedCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbPutFailedCnv.hpp b/castor/db/cnv/DbPutFailedCnv.hpp index 9de787bcf9cd290b9e8403674947c9199dca15c8..1e6b4ffbc8fafd57ffe01d183ce0140b415e08f4 100644 --- a/castor/db/cnv/DbPutFailedCnv.hpp +++ b/castor/db/cnv/DbPutFailedCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::PutFailed* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::PutFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::PutFailed* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::PutFailed* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbPutStartRequestCnv.cpp b/castor/db/cnv/DbPutStartRequestCnv.cpp index 9e467a2da32d7ae3ceb31c1e8351f44797517fc3..557bef957f13d34608434c53966cded9198e0174 100644 --- a/castor/db/cnv/DbPutStartRequestCnv.cpp +++ b/castor/db/cnv/DbPutStartRequestCnv.cpp @@ -163,7 +163,7 @@ void castor::db::cnv::DbPutStartRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); try { @@ -196,7 +196,7 @@ void castor::db::cnv::DbPutStartRequestCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbPutStartRequestCnv::fillRepSvcClass(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -228,7 +228,7 @@ void castor::db::cnv::DbPutStartRequestCnv::fillRepSvcClass(castor::stager::PutS // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbPutStartRequestCnv::fillRepIClient(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -246,7 +246,7 @@ void castor::db::cnv::DbPutStartRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); switch (type) { @@ -272,7 +272,7 @@ void castor::db::cnv::DbPutStartRequestCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbPutStartRequestCnv::fillObjSvcClass(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -310,7 +310,7 @@ void castor::db::cnv::DbPutStartRequestCnv::fillObjSvcClass(castor::stager::PutS // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbPutStartRequestCnv::fillObjIClient(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -351,7 +351,7 @@ void castor::db::cnv::DbPutStartRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); // check whether something needs to be done @@ -436,7 +436,7 @@ void castor::db::cnv::DbPutStartRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -929,7 +929,7 @@ void castor::db::cnv::DbPutStartRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbPutStartRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); // check whether something needs to be done @@ -982,7 +982,7 @@ void castor::db::cnv::DbPutStartRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbPutStartRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); // check whether something needs to be done @@ -1020,7 +1020,7 @@ void castor::db::cnv::DbPutStartRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbPutStartRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1075,7 +1075,7 @@ castor::IObject* castor::db::cnv::DbPutStartRequestCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbPutStartRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1140,7 +1140,7 @@ castor::db::cnv::DbPutStartRequestCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbPutStartRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbPutStartRequestCnv.hpp b/castor/db/cnv/DbPutStartRequestCnv.hpp index ce01b76cf72ad7cedb809d07cb53bfd7b7a54aec..77739f348e285325ebfc6db12e9a4418d715de78 100644 --- a/castor/db/cnv/DbPutStartRequestCnv.hpp +++ b/castor/db/cnv/DbPutStartRequestCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -217,7 +217,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -225,7 +225,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::PutStartRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbQueryParameterCnv.cpp b/castor/db/cnv/DbQueryParameterCnv.cpp index 151ee3b8a3e138f9afe249eb6f8f71624c944f03..e77e89ed17c4350750a3b6f89df0e5449dcc758a 100644 --- a/castor/db/cnv/DbQueryParameterCnv.cpp +++ b/castor/db/cnv/DbQueryParameterCnv.cpp @@ -145,7 +145,7 @@ void castor::db::cnv::DbQueryParameterCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); try { @@ -175,7 +175,7 @@ void castor::db::cnv::DbQueryParameterCnv::fillRep(castor::IAddress*, // fillRepQryRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbQueryParameterCnv::fillRepQryRequest(castor::stager::QueryParameter* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateQryRequestStatement) { m_updateQryRequestStatement = createStatement(s_updateQryRequestStatementString); @@ -193,7 +193,7 @@ void castor::db::cnv::DbQueryParameterCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); switch (type) { @@ -216,7 +216,7 @@ void castor::db::cnv::DbQueryParameterCnv::fillObj(castor::IAddress*, // fillObjQryRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbQueryParameterCnv::fillObjQryRequest(castor::stager::QueryParameter* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -259,7 +259,7 @@ void castor::db::cnv::DbQueryParameterCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); // check whether something needs to be done @@ -306,7 +306,7 @@ void castor::db::cnv::DbQueryParameterCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -434,7 +434,7 @@ void castor::db::cnv::DbQueryParameterCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbQueryParameterCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); // check whether something needs to be done @@ -473,7 +473,7 @@ void castor::db::cnv::DbQueryParameterCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbQueryParameterCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); // check whether something needs to be done @@ -508,7 +508,7 @@ void castor::db::cnv::DbQueryParameterCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbQueryParameterCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -548,7 +548,7 @@ castor::IObject* castor::db::cnv::DbQueryParameterCnv::createObj(castor::IAddres //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbQueryParameterCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -598,7 +598,7 @@ castor::db::cnv::DbQueryParameterCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbQueryParameterCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbQueryParameterCnv.hpp b/castor/db/cnv/DbQueryParameterCnv.hpp index 357d674a37595f9dcb488ce8ca0a86a0f6dd0baa..5a6de859a89dff2eb80e86352c0d19cc75a72e00 100644 --- a/castor/db/cnv/DbQueryParameterCnv.hpp +++ b/castor/db/cnv/DbQueryParameterCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type QryRequest refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepQryRequest(castor::stager::QueryParameter* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -209,7 +209,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type QryRequest refered by a given @@ -218,7 +218,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjQryRequest(castor::stager::QueryParameter* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbRequestTypeCnv.cpp b/castor/db/cnv/DbRequestTypeCnv.cpp index bfb0757aab4697a58679baabf11d87cda9f67cfc..8dbbe801de735ca14e00c2b2c3284e0137f0cc6b 100644 --- a/castor/db/cnv/DbRequestTypeCnv.cpp +++ b/castor/db/cnv/DbRequestTypeCnv.cpp @@ -150,7 +150,7 @@ void castor::db::cnv::DbRequestTypeCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); try { @@ -180,7 +180,7 @@ void castor::db::cnv::DbRequestTypeCnv::fillRep(castor::IAddress*, // fillRepChangePrivilege //------------------------------------------------------------------------------ void castor::db::cnv::DbRequestTypeCnv::fillRepChangePrivilege(castor::bwlist::RequestType* obj) - throw (castor::exception::Exception) { + { if (0 != obj->request()) { // Check checkChangePrivilegeExist statement if (0 == m_checkChangePrivilegeExistStatement) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbRequestTypeCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); switch (type) { @@ -238,7 +238,7 @@ void castor::db::cnv::DbRequestTypeCnv::fillObj(castor::IAddress*, // fillObjChangePrivilege //------------------------------------------------------------------------------ void castor::db::cnv::DbRequestTypeCnv::fillObjChangePrivilege(castor::bwlist::RequestType* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -281,7 +281,7 @@ void castor::db::cnv::DbRequestTypeCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); // check whether something needs to be done @@ -326,7 +326,7 @@ void castor::db::cnv::DbRequestTypeCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -430,7 +430,7 @@ void castor::db::cnv::DbRequestTypeCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbRequestTypeCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); // check whether something needs to be done @@ -468,7 +468,7 @@ void castor::db::cnv::DbRequestTypeCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbRequestTypeCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); // check whether something needs to be done @@ -506,7 +506,7 @@ void castor::db::cnv::DbRequestTypeCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbRequestTypeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -545,7 +545,7 @@ castor::IObject* castor::db::cnv::DbRequestTypeCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbRequestTypeCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -594,7 +594,7 @@ castor::db::cnv::DbRequestTypeCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbRequestTypeCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbRequestTypeCnv.hpp b/castor/db/cnv/DbRequestTypeCnv.hpp index 450f79dc0acf9a04e7968c759a63b59bec3f0aa0..676fe56dd7ed3ca4a49af5df4c336bbc97bb4a32 100644 --- a/castor/db/cnv/DbRequestTypeCnv.hpp +++ b/castor/db/cnv/DbRequestTypeCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type ChangePrivilege refered by a given @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepChangePrivilege(castor::bwlist::RequestType* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -210,7 +210,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type ChangePrivilege refered by a given @@ -219,7 +219,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjChangePrivilege(castor::bwlist::RequestType* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbSetFileGCWeightCnv.cpp b/castor/db/cnv/DbSetFileGCWeightCnv.cpp index 110bc71decb4abbf9f17017667531e66a86fa38e..69aaf31931217ed4fbce88edd0048c7b7689bfa2 100644 --- a/castor/db/cnv/DbSetFileGCWeightCnv.cpp +++ b/castor/db/cnv/DbSetFileGCWeightCnv.cpp @@ -178,7 +178,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); try { @@ -214,7 +214,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::fillRepSubRequest(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -267,7 +267,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillRepSubRequest(castor::stager::Se // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::fillRepSvcClass(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -299,7 +299,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillRepSvcClass(castor::stager::SetF // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::fillRepIClient(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -317,7 +317,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); switch (type) { @@ -346,7 +346,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::fillObjSubRequest(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillObjSubRequest(castor::stager::Se // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::fillObjSvcClass(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -436,7 +436,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::fillObjSvcClass(castor::stager::SetF // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::fillObjIClient(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -477,7 +477,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); // check whether something needs to be done @@ -548,7 +548,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -924,7 +924,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbSetFileGCWeightCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); // check whether something needs to be done @@ -973,7 +973,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbSetFileGCWeightCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); // check whether something needs to be done @@ -1016,7 +1016,7 @@ void castor::db::cnv::DbSetFileGCWeightCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbSetFileGCWeightCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1067,7 +1067,7 @@ castor::IObject* castor::db::cnv::DbSetFileGCWeightCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbSetFileGCWeightCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1128,7 +1128,7 @@ castor::db::cnv::DbSetFileGCWeightCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbSetFileGCWeightCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbSetFileGCWeightCnv.hpp b/castor/db/cnv/DbSetFileGCWeightCnv.hpp index c8dd6700429ce06e3d6a7bde5fbe19f59d8564e4..e4a6ba1c6e60638a4e31cd5f946a6245fb309660 100644 --- a/castor/db/cnv/DbSetFileGCWeightCnv.hpp +++ b/castor/db/cnv/DbSetFileGCWeightCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -242,7 +242,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -250,7 +250,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::SetFileGCWeight* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStageAbortRequestCnv.cpp b/castor/db/cnv/DbStageAbortRequestCnv.cpp index 9ae1593f6a497bce1ea22a1d81d945214cebdec4..7b2b69983e2316c77e60a5f46256912b8a8f09c6 100644 --- a/castor/db/cnv/DbStageAbortRequestCnv.cpp +++ b/castor/db/cnv/DbStageAbortRequestCnv.cpp @@ -191,7 +191,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); try { @@ -230,7 +230,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillRep(castor::IAddress*, // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillRepSvcClass(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -262,7 +262,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillRepSvcClass(castor::stager::St // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillRepIClient(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -277,7 +277,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillRepIClient(castor::stager::Sta // fillRepFileRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillRepFileRequest(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateFileRequestStatement) { m_updateFileRequestStatement = createStatement(s_updateFileRequestStatementString); @@ -292,7 +292,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillRepFileRequest(castor::stager: // fillRepNsFileId //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillRepNsFileId(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectNsFileIdStatement) { m_selectNsFileIdStatement = createStatement(s_selectNsFileIdStatementString); @@ -348,7 +348,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); switch (type) { @@ -380,7 +380,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillObj(castor::IAddress*, // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillObjSvcClass(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -418,7 +418,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillObjSvcClass(castor::stager::St // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillObjIClient(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -456,7 +456,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillObjIClient(castor::stager::Sta // fillObjFileRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillObjFileRequest(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -494,7 +494,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::fillObjFileRequest(castor::stager: // fillObjNsFileId //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::fillObjNsFileId(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectNsFileIdStatement) { m_selectNsFileIdStatement = createStatement(s_selectNsFileIdStatementString); @@ -549,7 +549,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); // check whether something needs to be done @@ -628,7 +628,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -1054,7 +1054,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbStageAbortRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); // check whether something needs to be done @@ -1103,7 +1103,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStageAbortRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); // check whether something needs to be done @@ -1141,7 +1141,7 @@ void castor::db::cnv::DbStageAbortRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStageAbortRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1192,7 +1192,7 @@ castor::IObject* castor::db::cnv::DbStageAbortRequestCnv::createObj(castor::IAdd //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStageAbortRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1253,7 +1253,7 @@ castor::db::cnv::DbStageAbortRequestCnv::bulkCreateObj(castor::IAddress* address // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStageAbortRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStageAbortRequestCnv.hpp b/castor/db/cnv/DbStageAbortRequestCnv.hpp index e7efb41cb9a153b0fcfe07b31ce27f36b530c6bb..56c278727e260bd8768cdf5c828c32af738fee65 100644 --- a/castor/db/cnv/DbStageAbortRequestCnv.hpp +++ b/castor/db/cnv/DbStageAbortRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type FileRequest refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepFileRequest(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type NsFileId refered by a given object. @@ -222,7 +222,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepNsFileId(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -234,7 +234,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -242,7 +242,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -250,7 +250,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type FileRequest refered by a given @@ -259,7 +259,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjFileRequest(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type NsFileId refered by a given object. @@ -267,7 +267,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjNsFileId(castor::stager::StageAbortRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStageFileQueryRequestCnv.cpp b/castor/db/cnv/DbStageFileQueryRequestCnv.cpp index 4cfa48c5e6512b9e838452ac0bd700d9b9a9938a..6f5dbfdd5db099616ce1fc7c4659d845b254eb20 100644 --- a/castor/db/cnv/DbStageFileQueryRequestCnv.cpp +++ b/castor/db/cnv/DbStageFileQueryRequestCnv.cpp @@ -184,7 +184,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); try { @@ -220,7 +220,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRep(castor::IAddress*, // fillRepQueryParameter //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRepQueryParameter(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectQueryParameterStatement) { m_selectQueryParameterStatement = createStatement(s_selectQueryParameterStatementString); @@ -273,7 +273,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRepQueryParameter(castor:: // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRepSvcClass(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -305,7 +305,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRepSvcClass(castor::stager // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::fillRepIClient(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); switch (type) { @@ -352,7 +352,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObj(castor::IAddress*, // fillObjQueryParameter //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObjQueryParameter(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectQueryParameterStatement) { m_selectQueryParameterStatement = createStatement(s_selectQueryParameterStatementString); @@ -404,7 +404,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObjQueryParameter(castor:: // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObjSvcClass(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObjSvcClass(castor::stager // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::fillObjIClient(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -483,7 +483,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); // check whether something needs to be done @@ -560,7 +560,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::bulkCreateRep(castor::IAddress std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -967,7 +967,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::bulkCreateRep(castor::IAddress void castor::db::cnv::DbStageFileQueryRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); // check whether something needs to be done @@ -1016,7 +1016,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStageFileQueryRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); // check whether something needs to be done @@ -1059,7 +1059,7 @@ void castor::db::cnv::DbStageFileQueryRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStageFileQueryRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1110,7 +1110,7 @@ castor::IObject* castor::db::cnv::DbStageFileQueryRequestCnv::createObj(castor:: //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStageFileQueryRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1171,7 +1171,7 @@ castor::db::cnv::DbStageFileQueryRequestCnv::bulkCreateObj(castor::IAddress* add // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStageFileQueryRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStageFileQueryRequestCnv.hpp b/castor/db/cnv/DbStageFileQueryRequestCnv.hpp index ba8a3036511d704db6e219c1fb87ff7fa9d0897b..f408a0ab79f79de935627832acd6f33eaf004c46 100644 --- a/castor/db/cnv/DbStageFileQueryRequestCnv.hpp +++ b/castor/db/cnv/DbStageFileQueryRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type QueryParameter refered by a given @@ -199,7 +199,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepQueryParameter(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -207,7 +207,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -215,7 +215,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -227,7 +227,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type QueryParameter refered by a given @@ -236,7 +236,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjQueryParameter(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -244,7 +244,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -252,7 +252,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StageFileQueryRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStageGetRequestCnv.cpp b/castor/db/cnv/DbStageGetRequestCnv.cpp index 6d9b1b986c5f42ffe2a4136b10d105d43e79cf9f..722a32ef1fdabac3d30e7d330cb855cbaac1e0ff 100644 --- a/castor/db/cnv/DbStageGetRequestCnv.cpp +++ b/castor/db/cnv/DbStageGetRequestCnv.cpp @@ -178,7 +178,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); try { @@ -214,7 +214,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::fillRepSubRequest(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -267,7 +267,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillRepSubRequest(castor::stager::St // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::fillRepSvcClass(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -299,7 +299,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillRepSvcClass(castor::stager::Stag // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::fillRepIClient(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -317,7 +317,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); switch (type) { @@ -346,7 +346,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::fillObjSubRequest(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillObjSubRequest(castor::stager::St // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::fillObjSvcClass(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -436,7 +436,7 @@ void castor::db::cnv::DbStageGetRequestCnv::fillObjSvcClass(castor::stager::Stag // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::fillObjIClient(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -477,7 +477,7 @@ void castor::db::cnv::DbStageGetRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); // check whether something needs to be done @@ -546,7 +546,7 @@ void castor::db::cnv::DbStageGetRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -903,7 +903,7 @@ void castor::db::cnv::DbStageGetRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbStageGetRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); // check whether something needs to be done @@ -951,7 +951,7 @@ void castor::db::cnv::DbStageGetRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStageGetRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); // check whether something needs to be done @@ -994,7 +994,7 @@ void castor::db::cnv::DbStageGetRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStageGetRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1044,7 +1044,7 @@ castor::IObject* castor::db::cnv::DbStageGetRequestCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStageGetRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1104,7 +1104,7 @@ castor::db::cnv::DbStageGetRequestCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStageGetRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStageGetRequestCnv.hpp b/castor/db/cnv/DbStageGetRequestCnv.hpp index a9a109c53feb027119eb2cadd10e5dcac8a44e97..abf6f1854820d20c86b78991afe362e347c3a082 100644 --- a/castor/db/cnv/DbStageGetRequestCnv.hpp +++ b/castor/db/cnv/DbStageGetRequestCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -242,7 +242,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -250,7 +250,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StageGetRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStagePrepareToGetRequestCnv.cpp b/castor/db/cnv/DbStagePrepareToGetRequestCnv.cpp index b9cc300077169b0eeaf0d1ff4bcc946af1187aa6..c16c7cde4224d16ebc3b5f6b9f0d90ad4d1bd544 100644 --- a/castor/db/cnv/DbStagePrepareToGetRequestCnv.cpp +++ b/castor/db/cnv/DbStagePrepareToGetRequestCnv.cpp @@ -178,7 +178,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); try { @@ -214,7 +214,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRepSubRequest(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -267,7 +267,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRepSubRequest(castor::s // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRepSvcClass(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -299,7 +299,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRepSvcClass(castor::sta // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillRepIClient(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -317,7 +317,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); switch (type) { @@ -346,7 +346,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObjSubRequest(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObjSubRequest(castor::s // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObjSvcClass(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -436,7 +436,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObjSvcClass(castor::sta // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::fillObjIClient(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -477,7 +477,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::createRep(castor::IAddress* castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); // check whether something needs to be done @@ -546,7 +546,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::bulkCreateRep(castor::IAddr std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -903,7 +903,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::bulkCreateRep(castor::IAddr void castor::db::cnv::DbStagePrepareToGetRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); // check whether something needs to be done @@ -951,7 +951,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::updateRep(castor::IAddress* void castor::db::cnv::DbStagePrepareToGetRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); // check whether something needs to be done @@ -994,7 +994,7 @@ void castor::db::cnv::DbStagePrepareToGetRequestCnv::deleteRep(castor::IAddress* // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStagePrepareToGetRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1044,7 +1044,7 @@ castor::IObject* castor::db::cnv::DbStagePrepareToGetRequestCnv::createObj(casto //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStagePrepareToGetRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1104,7 +1104,7 @@ castor::db::cnv::DbStagePrepareToGetRequestCnv::bulkCreateObj(castor::IAddress* // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToGetRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStagePrepareToGetRequestCnv.hpp b/castor/db/cnv/DbStagePrepareToGetRequestCnv.hpp index a83fd603853520e9d1bb06bcdae10afedab5d118..ef9191de7dda70b41bc3528b92297409f3b73f68 100644 --- a/castor/db/cnv/DbStagePrepareToGetRequestCnv.hpp +++ b/castor/db/cnv/DbStagePrepareToGetRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -226,7 +226,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -235,7 +235,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -243,7 +243,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -251,7 +251,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StagePrepareToGetRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStagePrepareToPutRequestCnv.cpp b/castor/db/cnv/DbStagePrepareToPutRequestCnv.cpp index 18afeb5517adf1c28164bd55e95855f7cd6bc534..6ba98830fdf770cbbfb33abfe867a857ede5e424 100644 --- a/castor/db/cnv/DbStagePrepareToPutRequestCnv.cpp +++ b/castor/db/cnv/DbStagePrepareToPutRequestCnv.cpp @@ -178,7 +178,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); try { @@ -214,7 +214,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRepSubRequest(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -267,7 +267,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRepSubRequest(castor::s // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRepSvcClass(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -299,7 +299,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRepSvcClass(castor::sta // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillRepIClient(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -317,7 +317,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); switch (type) { @@ -346,7 +346,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObjSubRequest(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObjSubRequest(castor::s // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObjSvcClass(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -436,7 +436,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObjSvcClass(castor::sta // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::fillObjIClient(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -477,7 +477,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::createRep(castor::IAddress* castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); // check whether something needs to be done @@ -546,7 +546,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::bulkCreateRep(castor::IAddr std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -903,7 +903,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::bulkCreateRep(castor::IAddr void castor::db::cnv::DbStagePrepareToPutRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); // check whether something needs to be done @@ -951,7 +951,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::updateRep(castor::IAddress* void castor::db::cnv::DbStagePrepareToPutRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); // check whether something needs to be done @@ -994,7 +994,7 @@ void castor::db::cnv::DbStagePrepareToPutRequestCnv::deleteRep(castor::IAddress* // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStagePrepareToPutRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1044,7 +1044,7 @@ castor::IObject* castor::db::cnv::DbStagePrepareToPutRequestCnv::createObj(casto //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStagePrepareToPutRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1104,7 +1104,7 @@ castor::db::cnv::DbStagePrepareToPutRequestCnv::bulkCreateObj(castor::IAddress* // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePrepareToPutRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStagePrepareToPutRequestCnv.hpp b/castor/db/cnv/DbStagePrepareToPutRequestCnv.hpp index 7bc573a968930fccae6c5fe9ff0f2ab0e2835416..d9e3300a3f1301e003363b143007c28f3ee3c554 100644 --- a/castor/db/cnv/DbStagePrepareToPutRequestCnv.hpp +++ b/castor/db/cnv/DbStagePrepareToPutRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -226,7 +226,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -235,7 +235,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -243,7 +243,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -251,7 +251,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StagePrepareToPutRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStagePutDoneRequestCnv.cpp b/castor/db/cnv/DbStagePutDoneRequestCnv.cpp index ffad3f0b6914793e2fb01e633d3426757f8100d9..fd96ca4fa34469b7b2fcc18e8b1e2d45aaf086c6 100644 --- a/castor/db/cnv/DbStagePutDoneRequestCnv.cpp +++ b/castor/db/cnv/DbStagePutDoneRequestCnv.cpp @@ -185,7 +185,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); try { @@ -224,7 +224,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepSubRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -277,7 +277,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepSubRequest(castor::stager // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepSvcClass(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -309,7 +309,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepSvcClass(castor::stager:: // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepIClient(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -324,7 +324,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepIClient(castor::stager::S // fillRepFileRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillRepFileRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateFileRequestStatement) { m_updateFileRequestStatement = createStatement(s_updateFileRequestStatementString); @@ -342,7 +342,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); switch (type) { @@ -374,7 +374,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjSubRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -426,7 +426,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjSubRequest(castor::stager // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjSvcClass(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -464,7 +464,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjSvcClass(castor::stager:: // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjIClient(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -502,7 +502,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjIClient(castor::stager::S // fillObjFileRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::fillObjFileRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -543,7 +543,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); // check whether something needs to be done @@ -616,7 +616,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -1016,7 +1016,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbStagePutDoneRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); // check whether something needs to be done @@ -1065,7 +1065,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStagePutDoneRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); // check whether something needs to be done @@ -1108,7 +1108,7 @@ void castor::db::cnv::DbStagePutDoneRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStagePutDoneRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1159,7 +1159,7 @@ castor::IObject* castor::db::cnv::DbStagePutDoneRequestCnv::createObj(castor::IA //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStagePutDoneRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1220,7 +1220,7 @@ castor::db::cnv::DbStagePutDoneRequestCnv::bulkCreateObj(castor::IAddress* addre // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutDoneRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStagePutDoneRequestCnv.hpp b/castor/db/cnv/DbStagePutDoneRequestCnv.hpp index d5fe20f300aeffd70649925b33134d1e6b42e247..25bfcb243c02f2ab55cb0a2bcf50e315891f1841 100644 --- a/castor/db/cnv/DbStagePutDoneRequestCnv.hpp +++ b/castor/db/cnv/DbStagePutDoneRequestCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type FileRequest refered by a given object. @@ -222,7 +222,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepFileRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -234,7 +234,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -243,7 +243,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -251,7 +251,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -259,7 +259,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type FileRequest refered by a given @@ -268,7 +268,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjFileRequest(castor::stager::StagePutDoneRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStagePutRequestCnv.cpp b/castor/db/cnv/DbStagePutRequestCnv.cpp index 651ae16216c90c7cdbba2fbead95f59bed9d7bfd..a59820ed0740232b78be00a240a63d095eeac48a 100644 --- a/castor/db/cnv/DbStagePutRequestCnv.cpp +++ b/castor/db/cnv/DbStagePutRequestCnv.cpp @@ -178,7 +178,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); try { @@ -214,7 +214,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::fillRepSubRequest(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -267,7 +267,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillRepSubRequest(castor::stager::St // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::fillRepSvcClass(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -299,7 +299,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillRepSvcClass(castor::stager::Stag // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::fillRepIClient(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -317,7 +317,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); switch (type) { @@ -346,7 +346,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::fillObjSubRequest(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillObjSubRequest(castor::stager::St // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::fillObjSvcClass(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -436,7 +436,7 @@ void castor::db::cnv::DbStagePutRequestCnv::fillObjSvcClass(castor::stager::Stag // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::fillObjIClient(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -477,7 +477,7 @@ void castor::db::cnv::DbStagePutRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); // check whether something needs to be done @@ -546,7 +546,7 @@ void castor::db::cnv::DbStagePutRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -903,7 +903,7 @@ void castor::db::cnv::DbStagePutRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbStagePutRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); // check whether something needs to be done @@ -951,7 +951,7 @@ void castor::db::cnv::DbStagePutRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStagePutRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); // check whether something needs to be done @@ -994,7 +994,7 @@ void castor::db::cnv::DbStagePutRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStagePutRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1044,7 +1044,7 @@ castor::IObject* castor::db::cnv::DbStagePutRequestCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStagePutRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1104,7 +1104,7 @@ castor::db::cnv::DbStagePutRequestCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStagePutRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStagePutRequestCnv.hpp b/castor/db/cnv/DbStagePutRequestCnv.hpp index 643f0bc8ffac31c32e0c2e58867914f15d8a9eb7..3257a43307402ef8c433ff401e02242429de2dbd 100644 --- a/castor/db/cnv/DbStagePutRequestCnv.hpp +++ b/castor/db/cnv/DbStagePutRequestCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -242,7 +242,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -250,7 +250,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StagePutRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStageRmRequestCnv.cpp b/castor/db/cnv/DbStageRmRequestCnv.cpp index ec1b38193354c453443194f8523b8f0f00ca8d8d..dfcfbcdd84e7e18e270a324eb2455c952719d24c 100644 --- a/castor/db/cnv/DbStageRmRequestCnv.cpp +++ b/castor/db/cnv/DbStageRmRequestCnv.cpp @@ -178,7 +178,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); try { @@ -214,7 +214,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillRep(castor::IAddress*, // fillRepSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::fillRepSubRequest(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -267,7 +267,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillRepSubRequest(castor::stager::Sta // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::fillRepSvcClass(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -299,7 +299,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillRepSvcClass(castor::stager::Stage // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::fillRepIClient(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -317,7 +317,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); switch (type) { @@ -346,7 +346,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillObj(castor::IAddress*, // fillObjSubRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::fillObjSubRequest(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectSubRequestStatement) { m_selectSubRequestStatement = createStatement(s_selectSubRequestStatementString); @@ -398,7 +398,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillObjSubRequest(castor::stager::Sta // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::fillObjSvcClass(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -436,7 +436,7 @@ void castor::db::cnv::DbStageRmRequestCnv::fillObjSvcClass(castor::stager::Stage // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::fillObjIClient(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -477,7 +477,7 @@ void castor::db::cnv::DbStageRmRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); // check whether something needs to be done @@ -546,7 +546,7 @@ void castor::db::cnv::DbStageRmRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -903,7 +903,7 @@ void castor::db::cnv::DbStageRmRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbStageRmRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); // check whether something needs to be done @@ -951,7 +951,7 @@ void castor::db::cnv::DbStageRmRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStageRmRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); // check whether something needs to be done @@ -994,7 +994,7 @@ void castor::db::cnv::DbStageRmRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStageRmRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1044,7 +1044,7 @@ castor::IObject* castor::db::cnv::DbStageRmRequestCnv::createObj(castor::IAddres //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStageRmRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1104,7 +1104,7 @@ castor::db::cnv::DbStageRmRequestCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStageRmRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStageRmRequestCnv.hpp b/castor/db/cnv/DbStageRmRequestCnv.hpp index 23bd50e717091ae1dbfa05ab2384442f9a89b656..28ccb8e29bed845e097e10ef651816a97c921ec5 100644 --- a/castor/db/cnv/DbStageRmRequestCnv.hpp +++ b/castor/db/cnv/DbStageRmRequestCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SubRequest refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSubRequest(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SubRequest refered by a given @@ -234,7 +234,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSubRequest(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -242,7 +242,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -250,7 +250,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StageRmRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbStgFilesDeletedCnv.cpp b/castor/db/cnv/DbStgFilesDeletedCnv.cpp index b370c5bce8079930b0cc1a2bd855041b3f8e0dc5..054060f0eadb46d6fbc9ae481e635334b937b633 100644 --- a/castor/db/cnv/DbStgFilesDeletedCnv.cpp +++ b/castor/db/cnv/DbStgFilesDeletedCnv.cpp @@ -184,7 +184,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); try { @@ -220,7 +220,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillRep(castor::IAddress*, // fillRepGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::fillRepGCFile(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -273,7 +273,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillRepGCFile(castor::stager::StgFil // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::fillRepSvcClass(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -305,7 +305,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillRepSvcClass(castor::stager::StgF // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::fillRepIClient(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); switch (type) { @@ -352,7 +352,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillObj(castor::IAddress*, // fillObjGCFile //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::fillObjGCFile(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectGCFileStatement) { m_selectGCFileStatement = createStatement(s_selectGCFileStatementString); @@ -404,7 +404,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillObjGCFile(castor::stager::StgFil // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::fillObjSvcClass(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::fillObjSvcClass(castor::stager::StgF // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::fillObjIClient(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -483,7 +483,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); // check whether something needs to be done @@ -560,7 +560,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -967,7 +967,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbStgFilesDeletedCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); // check whether something needs to be done @@ -1016,7 +1016,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbStgFilesDeletedCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); // check whether something needs to be done @@ -1059,7 +1059,7 @@ void castor::db::cnv::DbStgFilesDeletedCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbStgFilesDeletedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1110,7 +1110,7 @@ castor::IObject* castor::db::cnv::DbStgFilesDeletedCnv::createObj(castor::IAddre //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbStgFilesDeletedCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1171,7 +1171,7 @@ castor::db::cnv::DbStgFilesDeletedCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbStgFilesDeletedCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbStgFilesDeletedCnv.hpp b/castor/db/cnv/DbStgFilesDeletedCnv.hpp index b4b6f4c95b0c8c2fecc4c2210820047b1de153b0..df63dd7dc192cd875717ec89b2534f1755ac9731 100644 --- a/castor/db/cnv/DbStgFilesDeletedCnv.hpp +++ b/castor/db/cnv/DbStgFilesDeletedCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type GCFile refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepGCFile(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -213,7 +213,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -225,7 +225,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type GCFile refered by a given object. @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjGCFile(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -241,7 +241,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -249,7 +249,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::stager::StgFilesDeleted* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbSubRequestCnv.cpp b/castor/db/cnv/DbSubRequestCnv.cpp index 9b5b4e5dc417c763825a78cd1347c63f688b1671..9627d5df5c433357653fd5068f87e7262cde74cc 100644 --- a/castor/db/cnv/DbSubRequestCnv.cpp +++ b/castor/db/cnv/DbSubRequestCnv.cpp @@ -157,7 +157,7 @@ void castor::db::cnv::DbSubRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); try { @@ -190,7 +190,7 @@ void castor::db::cnv::DbSubRequestCnv::fillRep(castor::IAddress*, // fillRepCastorFile //------------------------------------------------------------------------------ void castor::db::cnv::DbSubRequestCnv::fillRepCastorFile(castor::stager::SubRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->castorFile()) { // Check checkCastorFileExist statement if (0 == m_checkCastorFileExistStatement) { @@ -222,7 +222,7 @@ void castor::db::cnv::DbSubRequestCnv::fillRepCastorFile(castor::stager::SubRequ // fillRepFileRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbSubRequestCnv::fillRepFileRequest(castor::stager::SubRequest* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateFileRequestStatement) { m_updateFileRequestStatement = createStatement(s_updateFileRequestStatementString); @@ -240,7 +240,7 @@ void castor::db::cnv::DbSubRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); switch (type) { @@ -266,7 +266,7 @@ void castor::db::cnv::DbSubRequestCnv::fillObj(castor::IAddress*, // fillObjCastorFile //------------------------------------------------------------------------------ void castor::db::cnv::DbSubRequestCnv::fillObjCastorFile(castor::stager::SubRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -304,7 +304,7 @@ void castor::db::cnv::DbSubRequestCnv::fillObjCastorFile(castor::stager::SubRequ // fillObjFileRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbSubRequestCnv::fillObjFileRequest(castor::stager::SubRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -347,7 +347,7 @@ void castor::db::cnv::DbSubRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); // check whether something needs to be done @@ -430,7 +430,7 @@ void castor::db::cnv::DbSubRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -925,7 +925,7 @@ void castor::db::cnv::DbSubRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbSubRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); // check whether something needs to be done @@ -979,7 +979,7 @@ void castor::db::cnv::DbSubRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbSubRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); // check whether something needs to be done @@ -1014,7 +1014,7 @@ void castor::db::cnv::DbSubRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbSubRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1070,7 +1070,7 @@ castor::IObject* castor::db::cnv::DbSubRequestCnv::createObj(castor::IAddress* a //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbSubRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1136,7 +1136,7 @@ castor::db::cnv::DbSubRequestCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbSubRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbSubRequestCnv.hpp b/castor/db/cnv/DbSubRequestCnv.hpp index 0dcb72e1f96deff6d16bbb211383792d5fede5df..9d3ab7db4012f05cc35d7bc1050b6b55c6bb30c2 100644 --- a/castor/db/cnv/DbSubRequestCnv.hpp +++ b/castor/db/cnv/DbSubRequestCnv.hpp @@ -93,7 +93,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -111,7 +111,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -125,7 +125,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -139,7 +139,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -151,7 +151,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -163,7 +163,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -171,7 +171,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -187,7 +187,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type CastorFile refered by a given object. @@ -195,7 +195,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepCastorFile(castor::stager::SubRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type FileRequest refered by a given object. @@ -203,7 +203,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepFileRequest(castor::stager::SubRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -215,7 +215,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type CastorFile refered by a given @@ -224,7 +224,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjCastorFile(castor::stager::SubRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type FileRequest refered by a given @@ -233,7 +233,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjFileRequest(castor::stager::SubRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbSvcClassCnv.cpp b/castor/db/cnv/DbSvcClassCnv.cpp index 6b2f082a72e08142283dbdce37dbb8d8203687a5..057a051cf43a7f452dc5c546db39352a1b84036f 100644 --- a/castor/db/cnv/DbSvcClassCnv.cpp +++ b/castor/db/cnv/DbSvcClassCnv.cpp @@ -152,7 +152,7 @@ void castor::db::cnv::DbSvcClassCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SvcClass* obj = dynamic_cast<castor::stager::SvcClass*>(object); try { @@ -182,7 +182,7 @@ void castor::db::cnv::DbSvcClassCnv::fillRep(castor::IAddress*, // fillRepFileClass //------------------------------------------------------------------------------ void castor::db::cnv::DbSvcClassCnv::fillRepFileClass(castor::stager::SvcClass* obj) - throw (castor::exception::Exception) { + { if (0 != obj->forcedFileClass()) { // Check checkFileClassExist statement if (0 == m_checkFileClassExistStatement) { @@ -217,7 +217,7 @@ void castor::db::cnv::DbSvcClassCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SvcClass* obj = dynamic_cast<castor::stager::SvcClass*>(object); switch (type) { @@ -240,7 +240,7 @@ void castor::db::cnv::DbSvcClassCnv::fillObj(castor::IAddress*, // fillObjFileClass //------------------------------------------------------------------------------ void castor::db::cnv::DbSvcClassCnv::fillObjFileClass(castor::stager::SvcClass* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -281,7 +281,7 @@ void castor::db::cnv::DbSvcClassCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::stager::SvcClass* obj = dynamic_cast<castor::stager::SvcClass*>(object); // check whether something needs to be done @@ -342,7 +342,7 @@ void castor::db::cnv::DbSvcClassCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -613,7 +613,7 @@ void castor::db::cnv::DbSvcClassCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbSvcClassCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SvcClass* obj = dynamic_cast<castor::stager::SvcClass*>(object); // check whether something needs to be done @@ -659,7 +659,7 @@ void castor::db::cnv::DbSvcClassCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbSvcClassCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::stager::SvcClass* obj = dynamic_cast<castor::stager::SvcClass*>(object); // check whether something needs to be done @@ -694,7 +694,7 @@ void castor::db::cnv::DbSvcClassCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbSvcClassCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -741,7 +741,7 @@ castor::IObject* castor::db::cnv::DbSvcClassCnv::createObj(castor::IAddress* add //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbSvcClassCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -798,7 +798,7 @@ castor::db::cnv::DbSvcClassCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbSvcClassCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbSvcClassCnv.hpp b/castor/db/cnv/DbSvcClassCnv.hpp index b3db8d5c4736c995b8ed75ab0de920517d13b96b..18eb43a36a0171ef7b8ec1bb0c56cf7436504a72 100644 --- a/castor/db/cnv/DbSvcClassCnv.hpp +++ b/castor/db/cnv/DbSvcClassCnv.hpp @@ -93,7 +93,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -111,7 +111,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -125,7 +125,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -139,7 +139,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -151,7 +151,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -163,7 +163,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -171,7 +171,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -187,7 +187,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type FileClass refered by a given object. @@ -195,7 +195,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepFileClass(castor::stager::SvcClass* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -207,7 +207,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type FileClass refered by a given object. @@ -215,7 +215,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjFileClass(castor::stager::SvcClass* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTape2DriveDedicationCnv.cpp b/castor/db/cnv/DbTape2DriveDedicationCnv.cpp index 0743e0f289222f0783a51c585fe080230497ccc4..e92cf3fc0d9f76d7b688df81e73fc0cf16867aa1 100644 --- a/castor/db/cnv/DbTape2DriveDedicationCnv.cpp +++ b/castor/db/cnv/DbTape2DriveDedicationCnv.cpp @@ -150,7 +150,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::Tape2DriveDedication* obj = dynamic_cast<castor::vdqm::Tape2DriveDedication*>(object); try { @@ -180,7 +180,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::fillRep(castor::IAddress*, // fillRepTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTape2DriveDedicationCnv::fillRepTapeDrive(castor::vdqm::Tape2DriveDedication* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tapeDrive()) { // Check checkTapeDriveExist statement if (0 == m_checkTapeDriveExistStatement) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::Tape2DriveDedication* obj = dynamic_cast<castor::vdqm::Tape2DriveDedication*>(object); switch (type) { @@ -238,7 +238,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::fillObj(castor::IAddress*, // fillObjTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTape2DriveDedicationCnv::fillObjTapeDrive(castor::vdqm::Tape2DriveDedication* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -279,7 +279,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::vdqm::Tape2DriveDedication* obj = dynamic_cast<castor::vdqm::Tape2DriveDedication*>(object); // check whether something needs to be done @@ -328,7 +328,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::bulkCreateRep(castor::IAddress* std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -475,7 +475,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::bulkCreateRep(castor::IAddress* void castor::db::cnv::DbTape2DriveDedicationCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::Tape2DriveDedication* obj = dynamic_cast<castor::vdqm::Tape2DriveDedication*>(object); // check whether something needs to be done @@ -514,7 +514,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTape2DriveDedicationCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::Tape2DriveDedication* obj = dynamic_cast<castor::vdqm::Tape2DriveDedication*>(object); // check whether something needs to be done @@ -549,7 +549,7 @@ void castor::db::cnv::DbTape2DriveDedicationCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTape2DriveDedicationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -590,7 +590,7 @@ castor::IObject* castor::db::cnv::DbTape2DriveDedicationCnv::createObj(castor::I //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTape2DriveDedicationCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -641,7 +641,7 @@ castor::db::cnv::DbTape2DriveDedicationCnv::bulkCreateObj(castor::IAddress* addr // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTape2DriveDedicationCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTape2DriveDedicationCnv.hpp b/castor/db/cnv/DbTape2DriveDedicationCnv.hpp index bc262532e6886104c4c99776675ecb2ef2d796f5..e7b431f09dc00fa67100b3493f2776d297b786a1 100644 --- a/castor/db/cnv/DbTape2DriveDedicationCnv.hpp +++ b/castor/db/cnv/DbTape2DriveDedicationCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeDrive refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeDrive(castor::vdqm::Tape2DriveDedication* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -210,7 +210,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeDrive refered by a given object. @@ -218,7 +218,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeDrive(castor::vdqm::Tape2DriveDedication* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTapeAccessSpecificationCnv.cpp b/castor/db/cnv/DbTapeAccessSpecificationCnv.cpp index c37dbf2d7d8b3b088f2eaf886340745585d0b3e0..840c69d93687b350c0bf7a9cf8f1df74b711ef45 100644 --- a/castor/db/cnv/DbTapeAccessSpecificationCnv.cpp +++ b/castor/db/cnv/DbTapeAccessSpecificationCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); // check whether something needs to be done @@ -236,7 +236,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::bulkCreateRep(castor::IAddre std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -369,7 +369,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::bulkCreateRep(castor::IAddre void castor::db::cnv::DbTapeAccessSpecificationCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); // check whether something needs to be done @@ -409,7 +409,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTapeAccessSpecificationCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); // check whether something needs to be done @@ -444,7 +444,7 @@ void castor::db::cnv::DbTapeAccessSpecificationCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTapeAccessSpecificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -485,7 +485,7 @@ castor::IObject* castor::db::cnv::DbTapeAccessSpecificationCnv::createObj(castor //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTapeAccessSpecificationCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -536,7 +536,7 @@ castor::db::cnv::DbTapeAccessSpecificationCnv::bulkCreateObj(castor::IAddress* a // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeAccessSpecificationCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTapeAccessSpecificationCnv.hpp b/castor/db/cnv/DbTapeAccessSpecificationCnv.hpp index fda6b1b870aff49993ee97bbad1ae3bfa3b68ab6..1884f7b8b4ad38dbbc9349c19f8f4462a14f0be4 100644 --- a/castor/db/cnv/DbTapeAccessSpecificationCnv.hpp +++ b/castor/db/cnv/DbTapeAccessSpecificationCnv.hpp @@ -88,7 +88,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -106,7 +106,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -120,7 +120,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -134,7 +134,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -146,7 +146,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -158,7 +158,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -182,7 +182,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -194,7 +194,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTapeDriveCnv.cpp b/castor/db/cnv/DbTapeDriveCnv.cpp index 2753fdc708699c5398b073d7e34ff2d867860935..e45de4316a51616a9ae02eee3c02bd8b5844fe5f 100644 --- a/castor/db/cnv/DbTapeDriveCnv.cpp +++ b/castor/db/cnv/DbTapeDriveCnv.cpp @@ -250,7 +250,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); try { @@ -295,7 +295,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRep(castor::IAddress*, // fillRepVdqmTape //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillRepVdqmTape(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tape()) { // Check checkVdqmTapeExist statement if (0 == m_checkVdqmTapeExistStatement) { @@ -327,7 +327,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRepVdqmTape(castor::vdqm::TapeDrive* o // fillRepTapeRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeRequest(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check selectTapeRequest statement if (0 == m_selectTapeRequestStatement) { m_selectTapeRequestStatement = createStatement(s_selectTapeRequestStatementString); @@ -389,7 +389,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeRequest(castor::vdqm::TapeDrive // fillRepTapeDriveDedication //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeDriveDedication(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectTapeDriveDedicationStatement) { m_selectTapeDriveDedicationStatement = createStatement(s_selectTapeDriveDedicationStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeDriveDedication(castor::vdqm::T // fillRepTapeDriveCompatibility //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeDriveCompatibility(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectTapeDriveCompatibilityStatement) { m_selectTapeDriveCompatibilityStatement = createStatement(s_selectTapeDriveCompatibilityStatementString); @@ -491,7 +491,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeDriveCompatibility(castor::vdqm // fillRepDeviceGroupName //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillRepDeviceGroupName(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { if (0 != obj->deviceGroupName()) { // Check checkDeviceGroupNameExist statement if (0 == m_checkDeviceGroupNameExistStatement) { @@ -523,7 +523,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillRepDeviceGroupName(castor::vdqm::TapeD // fillRepTapeServer //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillRepTapeServer(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tapeServer()) { // Check checkTapeServerExist statement if (0 == m_checkTapeServerExistStatement) { @@ -558,7 +558,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); switch (type) { @@ -596,7 +596,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObj(castor::IAddress*, // fillObjVdqmTape //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillObjVdqmTape(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -634,7 +634,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObjVdqmTape(castor::vdqm::TapeDrive* o // fillObjTapeRequest //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeRequest(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -674,7 +674,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeRequest(castor::vdqm::TapeDrive // fillObjTapeDriveDedication //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeDriveDedication(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectTapeDriveDedicationStatement) { m_selectTapeDriveDedicationStatement = createStatement(s_selectTapeDriveDedicationStatementString); @@ -726,7 +726,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeDriveDedication(castor::vdqm::T // fillObjTapeDriveCompatibility //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeDriveCompatibility(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectTapeDriveCompatibilityStatement) { m_selectTapeDriveCompatibilityStatement = createStatement(s_selectTapeDriveCompatibilityStatementString); @@ -776,7 +776,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeDriveCompatibility(castor::vdqm // fillObjDeviceGroupName //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillObjDeviceGroupName(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -814,7 +814,7 @@ void castor::db::cnv::DbTapeDriveCnv::fillObjDeviceGroupName(castor::vdqm::TapeD // fillObjTapeServer //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::fillObjTapeServer(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -857,7 +857,7 @@ void castor::db::cnv::DbTapeDriveCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); // check whether something needs to be done @@ -924,7 +924,7 @@ void castor::db::cnv::DbTapeDriveCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -1242,7 +1242,7 @@ void castor::db::cnv::DbTapeDriveCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbTapeDriveCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); // check whether something needs to be done @@ -1288,7 +1288,7 @@ void castor::db::cnv::DbTapeDriveCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTapeDriveCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); // check whether something needs to be done @@ -1323,7 +1323,7 @@ void castor::db::cnv::DbTapeDriveCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTapeDriveCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1370,7 +1370,7 @@ castor::IObject* castor::db::cnv::DbTapeDriveCnv::createObj(castor::IAddress* ad //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTapeDriveCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1427,7 +1427,7 @@ castor::db::cnv::DbTapeDriveCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTapeDriveCnv.hpp b/castor/db/cnv/DbTapeDriveCnv.hpp index 78c83766baad6c22b553d63f9520c0e41efeda2c..7d64d09ca09f2e51e52e33d949df57b966116ae0 100644 --- a/castor/db/cnv/DbTapeDriveCnv.hpp +++ b/castor/db/cnv/DbTapeDriveCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type VdqmTape refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepVdqmTape(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeRequest refered by a given object. @@ -205,7 +205,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeRequest(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeDriveDedication refered by a given @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeDriveDedication(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeDriveCompatibility refered by a given @@ -223,7 +223,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeDriveCompatibility(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type DeviceGroupName refered by a given @@ -232,7 +232,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepDeviceGroupName(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeServer refered by a given object. @@ -240,7 +240,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeServer(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -252,7 +252,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type VdqmTape refered by a given object. @@ -260,7 +260,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjVdqmTape(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeRequest refered by a given @@ -269,7 +269,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeRequest(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeDriveDedication refered by a @@ -278,7 +278,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeDriveDedication(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeDriveCompatibility refered by a @@ -287,7 +287,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeDriveCompatibility(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type DeviceGroupName refered by a given @@ -296,7 +296,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjDeviceGroupName(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeServer refered by a given @@ -305,7 +305,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeServer(castor::vdqm::TapeDrive* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTapeDriveCompatibilityCnv.cpp b/castor/db/cnv/DbTapeDriveCompatibilityCnv.cpp index 64f68017b1b4b133689b35796d393852d20a4a2e..b104aaa0d9e7e8f1e298e92bc55daa6446c3f74a 100644 --- a/castor/db/cnv/DbTapeDriveCompatibilityCnv.cpp +++ b/castor/db/cnv/DbTapeDriveCompatibilityCnv.cpp @@ -150,7 +150,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); try { @@ -180,7 +180,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::fillRep(castor::IAddress*, // fillRepTapeAccessSpecification //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCompatibilityCnv::fillRepTapeAccessSpecification(castor::vdqm::TapeDriveCompatibility* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tapeAccessSpecification()) { // Check checkTapeAccessSpecificationExist statement if (0 == m_checkTapeAccessSpecificationExistStatement) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); switch (type) { @@ -238,7 +238,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::fillObj(castor::IAddress*, // fillObjTapeAccessSpecification //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCompatibilityCnv::fillObjTapeAccessSpecification(castor::vdqm::TapeDriveCompatibility* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -279,7 +279,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); // check whether something needs to be done @@ -326,7 +326,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::bulkCreateRep(castor::IAddres std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -454,7 +454,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::bulkCreateRep(castor::IAddres void castor::db::cnv::DbTapeDriveCompatibilityCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); // check whether something needs to be done @@ -493,7 +493,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTapeDriveCompatibilityCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); // check whether something needs to be done @@ -528,7 +528,7 @@ void castor::db::cnv::DbTapeDriveCompatibilityCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTapeDriveCompatibilityCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -568,7 +568,7 @@ castor::IObject* castor::db::cnv::DbTapeDriveCompatibilityCnv::createObj(castor: //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTapeDriveCompatibilityCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -618,7 +618,7 @@ castor::db::cnv::DbTapeDriveCompatibilityCnv::bulkCreateObj(castor::IAddress* ad // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveCompatibilityCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTapeDriveCompatibilityCnv.hpp b/castor/db/cnv/DbTapeDriveCompatibilityCnv.hpp index 7705fefc49d5095406a17df4f3dd1eadc17df79f..a21a8aeebddc8db58232e819d68ee81b1c81c39a 100644 --- a/castor/db/cnv/DbTapeDriveCompatibilityCnv.hpp +++ b/castor/db/cnv/DbTapeDriveCompatibilityCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeAccessSpecification refered by a @@ -199,7 +199,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeAccessSpecification(castor::vdqm::TapeDriveCompatibility* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -211,7 +211,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeAccessSpecification refered by a @@ -220,7 +220,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeAccessSpecification(castor::vdqm::TapeDriveCompatibility* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTapeDriveDedicationCnv.cpp b/castor/db/cnv/DbTapeDriveDedicationCnv.cpp index 0d06ae21882808e690528ff7650aa3f369539cd9..088495a65e794562b7259e6e9db11ddfe3d7aebc 100644 --- a/castor/db/cnv/DbTapeDriveDedicationCnv.cpp +++ b/castor/db/cnv/DbTapeDriveDedicationCnv.cpp @@ -150,7 +150,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); try { @@ -180,7 +180,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::fillRep(castor::IAddress*, // fillRepTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveDedicationCnv::fillRepTapeDrive(castor::vdqm::TapeDriveDedication* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tapeDrive()) { // Check checkTapeDriveExist statement if (0 == m_checkTapeDriveExistStatement) { @@ -215,7 +215,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); switch (type) { @@ -238,7 +238,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::fillObj(castor::IAddress*, // fillObjTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveDedicationCnv::fillObjTapeDrive(castor::vdqm::TapeDriveDedication* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -281,7 +281,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); // check whether something needs to be done @@ -340,7 +340,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -592,7 +592,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbTapeDriveDedicationCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); // check whether something needs to be done @@ -637,7 +637,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTapeDriveDedicationCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); // check whether something needs to be done @@ -672,7 +672,7 @@ void castor::db::cnv::DbTapeDriveDedicationCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTapeDriveDedicationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -718,7 +718,7 @@ castor::IObject* castor::db::cnv::DbTapeDriveDedicationCnv::createObj(castor::IA //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTapeDriveDedicationCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -774,7 +774,7 @@ castor::db::cnv::DbTapeDriveDedicationCnv::bulkCreateObj(castor::IAddress* addre // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeDriveDedicationCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTapeDriveDedicationCnv.hpp b/castor/db/cnv/DbTapeDriveDedicationCnv.hpp index 10387a3c1191e26e421d4796c7a614bceeb3d329..f778e15fa6ad8837c4b59ce1fa7e7ca34ee73663 100644 --- a/castor/db/cnv/DbTapeDriveDedicationCnv.hpp +++ b/castor/db/cnv/DbTapeDriveDedicationCnv.hpp @@ -96,7 +96,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -114,7 +114,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -128,7 +128,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -142,7 +142,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -154,7 +154,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -166,7 +166,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -174,7 +174,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -190,7 +190,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeDrive refered by a given object. @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeDrive(castor::vdqm::TapeDriveDedication* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -210,7 +210,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeDrive refered by a given object. @@ -218,7 +218,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeDrive(castor::vdqm::TapeDriveDedication* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTapeRequestCnv.cpp b/castor/db/cnv/DbTapeRequestCnv.cpp index ae7020c2dd2c7c5e9b2609a56097be16c6d514e6..b2a04d3a5cfa1c362773c388e9036c7a24eaf02a 100644 --- a/castor/db/cnv/DbTapeRequestCnv.cpp +++ b/castor/db/cnv/DbTapeRequestCnv.cpp @@ -234,7 +234,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); try { @@ -279,7 +279,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRep(castor::IAddress*, // fillRepVdqmTape //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillRepVdqmTape(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tape()) { // Check checkVdqmTapeExist statement if (0 == m_checkVdqmTapeExistStatement) { @@ -311,7 +311,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRepVdqmTape(castor::vdqm::TapeReques // fillRepTapeAccessSpecification //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillRepTapeAccessSpecification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->tapeAccessSpecification()) { // Check checkTapeAccessSpecificationExist statement if (0 == m_checkTapeAccessSpecificationExistStatement) { @@ -343,7 +343,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRepTapeAccessSpecification(castor::v // fillRepTapeServer //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillRepTapeServer(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->requestedSrv()) { // Check checkTapeServerExist statement if (0 == m_checkTapeServerExistStatement) { @@ -375,7 +375,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRepTapeServer(castor::vdqm::TapeRequ // fillRepTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillRepTapeDrive(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check selectTapeDrive statement if (0 == m_selectTapeDriveStatement) { m_selectTapeDriveStatement = createStatement(s_selectTapeDriveStatementString); @@ -437,7 +437,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRepTapeDrive(castor::vdqm::TapeReque // fillRepDeviceGroupName //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillRepDeviceGroupName(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->deviceGroupName()) { // Check checkDeviceGroupNameExist statement if (0 == m_checkDeviceGroupNameExistStatement) { @@ -469,7 +469,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillRepDeviceGroupName(castor::vdqm::Tap // fillRepClientIdentification //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillRepClientIdentification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { if (0 != obj->client()) { // Check checkClientIdentificationExist statement if (0 == m_checkClientIdentificationExistStatement) { @@ -504,7 +504,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); switch (type) { @@ -542,7 +542,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObj(castor::IAddress*, // fillObjVdqmTape //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillObjVdqmTape(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -580,7 +580,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObjVdqmTape(castor::vdqm::TapeReques // fillObjTapeAccessSpecification //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillObjTapeAccessSpecification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -618,7 +618,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObjTapeAccessSpecification(castor::v // fillObjTapeServer //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillObjTapeServer(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -656,7 +656,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObjTapeServer(castor::vdqm::TapeRequ // fillObjTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillObjTapeDrive(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -696,7 +696,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObjTapeDrive(castor::vdqm::TapeReque // fillObjDeviceGroupName //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillObjDeviceGroupName(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -734,7 +734,7 @@ void castor::db::cnv::DbTapeRequestCnv::fillObjDeviceGroupName(castor::vdqm::Tap // fillObjClientIdentification //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::fillObjClientIdentification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -775,7 +775,7 @@ void castor::db::cnv::DbTapeRequestCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); // check whether something needs to be done @@ -842,7 +842,7 @@ void castor::db::cnv::DbTapeRequestCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -1165,7 +1165,7 @@ void castor::db::cnv::DbTapeRequestCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbTapeRequestCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); // check whether something needs to be done @@ -1208,7 +1208,7 @@ void castor::db::cnv::DbTapeRequestCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTapeRequestCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); // check whether something needs to be done @@ -1246,7 +1246,7 @@ void castor::db::cnv::DbTapeRequestCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTapeRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1291,7 +1291,7 @@ castor::IObject* castor::db::cnv::DbTapeRequestCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTapeRequestCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1346,7 +1346,7 @@ castor::db::cnv::DbTapeRequestCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeRequestCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTapeRequestCnv.hpp b/castor/db/cnv/DbTapeRequestCnv.hpp index f465c64cb5d8e90d43c72eb7074db59900e24326..2dbc1d1ac86ab0e8a8df665d165ee454dc6ed7b0 100644 --- a/castor/db/cnv/DbTapeRequestCnv.hpp +++ b/castor/db/cnv/DbTapeRequestCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type VdqmTape refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepVdqmTape(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeAccessSpecification refered by a @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeAccessSpecification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeServer refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeServer(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeDrive refered by a given object. @@ -222,7 +222,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeDrive(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type DeviceGroupName refered by a given @@ -231,7 +231,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepDeviceGroupName(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type ClientIdentification refered by a given @@ -240,7 +240,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepClientIdentification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -252,7 +252,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type VdqmTape refered by a given object. @@ -260,7 +260,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjVdqmTape(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeAccessSpecification refered by a @@ -269,7 +269,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeAccessSpecification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeServer refered by a given @@ -278,7 +278,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeServer(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeDrive refered by a given object. @@ -286,7 +286,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeDrive(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type DeviceGroupName refered by a given @@ -295,7 +295,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjDeviceGroupName(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type ClientIdentification refered by a @@ -304,7 +304,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjClientIdentification(castor::vdqm::TapeRequest* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbTapeServerCnv.cpp b/castor/db/cnv/DbTapeServerCnv.cpp index 48b5b2b587c61f1562bfd4c09fce06ba709d87e2..0ee1bfb4f480281d512b02dc599cfe0d8e0daffc 100644 --- a/castor/db/cnv/DbTapeServerCnv.cpp +++ b/castor/db/cnv/DbTapeServerCnv.cpp @@ -159,7 +159,7 @@ void castor::db::cnv::DbTapeServerCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); try { @@ -189,7 +189,7 @@ void castor::db::cnv::DbTapeServerCnv::fillRep(castor::IAddress*, // fillRepTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeServerCnv::fillRepTapeDrive(castor::vdqm::TapeServer* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectTapeDriveStatement) { m_selectTapeDriveStatement = createStatement(s_selectTapeDriveStatementString); @@ -245,7 +245,7 @@ void castor::db::cnv::DbTapeServerCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); switch (type) { @@ -268,7 +268,7 @@ void castor::db::cnv::DbTapeServerCnv::fillObj(castor::IAddress*, // fillObjTapeDrive //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeServerCnv::fillObjTapeDrive(castor::vdqm::TapeServer* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectTapeDriveStatement) { m_selectTapeDriveStatement = createStatement(s_selectTapeDriveStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbTapeServerCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); // check whether something needs to be done @@ -368,7 +368,7 @@ void castor::db::cnv::DbTapeServerCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -477,7 +477,7 @@ void castor::db::cnv::DbTapeServerCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbTapeServerCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); // check whether something needs to be done @@ -516,7 +516,7 @@ void castor::db::cnv::DbTapeServerCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbTapeServerCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); // check whether something needs to be done @@ -556,7 +556,7 @@ void castor::db::cnv::DbTapeServerCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbTapeServerCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -596,7 +596,7 @@ castor::IObject* castor::db::cnv::DbTapeServerCnv::createObj(castor::IAddress* a //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbTapeServerCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -646,7 +646,7 @@ castor::db::cnv::DbTapeServerCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbTapeServerCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbTapeServerCnv.hpp b/castor/db/cnv/DbTapeServerCnv.hpp index 6c847aa79594053432ad442586cc1720ee99f1fc..d2cbbeae49a2b75dc49cc46f4c11955a84649b0a 100644 --- a/castor/db/cnv/DbTapeServerCnv.hpp +++ b/castor/db/cnv/DbTapeServerCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type TapeDrive refered by a given object. @@ -197,7 +197,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepTapeDrive(castor::vdqm::TapeServer* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -209,7 +209,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type TapeDrive refered by a given object. @@ -217,7 +217,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjTapeDrive(castor::vdqm::TapeServer* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbVdqmTapeCnv.cpp b/castor/db/cnv/DbVdqmTapeCnv.cpp index cd6f371fcaf2ade0aee72f00c955410567876c67..5d62d1475343523c15e65348f03511196c8184eb 100644 --- a/castor/db/cnv/DbVdqmTapeCnv.cpp +++ b/castor/db/cnv/DbVdqmTapeCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbVdqmTapeCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbVdqmTapeCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbVdqmTapeCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); // check whether something needs to be done @@ -232,7 +232,7 @@ void castor::db::cnv::DbVdqmTapeCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -322,7 +322,7 @@ void castor::db::cnv::DbVdqmTapeCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbVdqmTapeCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); // check whether something needs to be done @@ -360,7 +360,7 @@ void castor::db::cnv::DbVdqmTapeCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbVdqmTapeCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); // check whether something needs to be done @@ -395,7 +395,7 @@ void castor::db::cnv::DbVdqmTapeCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbVdqmTapeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -434,7 +434,7 @@ castor::IObject* castor::db::cnv::DbVdqmTapeCnv::createObj(castor::IAddress* add //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbVdqmTapeCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -483,7 +483,7 @@ castor::db::cnv::DbVdqmTapeCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbVdqmTapeCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbVdqmTapeCnv.hpp b/castor/db/cnv/DbVdqmTapeCnv.hpp index ca199c0e347c22ba448b6099bda883ec836d2a84..dee26c49fad2ce9d4511279ea086eb79a23f2e6e 100644 --- a/castor/db/cnv/DbVdqmTapeCnv.hpp +++ b/castor/db/cnv/DbVdqmTapeCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbVersionQueryCnv.cpp b/castor/db/cnv/DbVersionQueryCnv.cpp index 32f6b1557204cbe953d2ab63ecce08bf36ba22e6..97c4fb7f0819293f496ad44e9876648b305cb1a5 100644 --- a/castor/db/cnv/DbVersionQueryCnv.cpp +++ b/castor/db/cnv/DbVersionQueryCnv.cpp @@ -184,7 +184,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); try { @@ -220,7 +220,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillRep(castor::IAddress*, // fillRepQueryParameter //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::fillRepQueryParameter(castor::query::VersionQuery* obj) - throw (castor::exception::Exception) { + { // check select statement if (0 == m_selectQueryParameterStatement) { m_selectQueryParameterStatement = createStatement(s_selectQueryParameterStatementString); @@ -273,7 +273,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillRepQueryParameter(castor::query::Ve // fillRepSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::fillRepSvcClass(castor::query::VersionQuery* obj) - throw (castor::exception::Exception) { + { if (0 != obj->svcClass()) { // Check checkSvcClassExist statement if (0 == m_checkSvcClassExistStatement) { @@ -305,7 +305,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillRepSvcClass(castor::query::VersionQ // fillRepIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::fillRepIClient(castor::query::VersionQuery* obj) - throw (castor::exception::Exception) { + { // Check update statement if (0 == m_updateIClientStatement) { m_updateIClientStatement = createStatement(s_updateIClientStatementString); @@ -323,7 +323,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); switch (type) { @@ -352,7 +352,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillObj(castor::IAddress*, // fillObjQueryParameter //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::fillObjQueryParameter(castor::query::VersionQuery* obj) - throw (castor::exception::Exception) { + { // Check select statement if (0 == m_selectQueryParameterStatement) { m_selectQueryParameterStatement = createStatement(s_selectQueryParameterStatementString); @@ -404,7 +404,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillObjQueryParameter(castor::query::Ve // fillObjSvcClass //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::fillObjSvcClass(castor::query::VersionQuery* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -442,7 +442,7 @@ void castor::db::cnv::DbVersionQueryCnv::fillObjSvcClass(castor::query::VersionQ // fillObjIClient //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::fillObjIClient(castor::query::VersionQuery* obj) - throw (castor::exception::Exception) { + { // Check whether the statement is ok if (0 == m_selectStatement) { m_selectStatement = createStatement(s_selectStatementString); @@ -483,7 +483,7 @@ void castor::db::cnv::DbVersionQueryCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); // check whether something needs to be done @@ -558,7 +558,7 @@ void castor::db::cnv::DbVersionQueryCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -941,7 +941,7 @@ void castor::db::cnv::DbVersionQueryCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbVersionQueryCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); // check whether something needs to be done @@ -989,7 +989,7 @@ void castor::db::cnv::DbVersionQueryCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbVersionQueryCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); // check whether something needs to be done @@ -1032,7 +1032,7 @@ void castor::db::cnv::DbVersionQueryCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbVersionQueryCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -1082,7 +1082,7 @@ castor::IObject* castor::db::cnv::DbVersionQueryCnv::createObj(castor::IAddress* //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbVersionQueryCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -1142,7 +1142,7 @@ castor::db::cnv::DbVersionQueryCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbVersionQueryCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbVersionQueryCnv.hpp b/castor/db/cnv/DbVersionQueryCnv.hpp index b025e7adfacca99bacaf3386a659e58e627a8228..9c93c39610640e85fb630d15c45c79becd034697 100644 --- a/castor/db/cnv/DbVersionQueryCnv.hpp +++ b/castor/db/cnv/DbVersionQueryCnv.hpp @@ -95,7 +95,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -113,7 +113,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -127,7 +127,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -141,7 +141,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -153,7 +153,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -173,7 +173,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -189,7 +189,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type QueryParameter refered by a given @@ -198,7 +198,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepQueryParameter(castor::query::VersionQuery* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type SvcClass refered by a given object. @@ -206,7 +206,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepSvcClass(castor::query::VersionQuery* obj) - throw (castor::exception::Exception); + ; /** * Fill the database with objects of type IClient refered by a given object. @@ -214,7 +214,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillRepIClient(castor::query::VersionQuery* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -226,7 +226,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type QueryParameter refered by a given @@ -235,7 +235,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjQueryParameter(castor::query::VersionQuery* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type SvcClass refered by a given object. @@ -243,7 +243,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjSvcClass(castor::query::VersionQuery* obj) - throw (castor::exception::Exception); + ; /** * Retrieve from the database objects of type IClient refered by a given object. @@ -251,7 +251,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void fillObjIClient(castor::query::VersionQuery* obj) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/cnv/DbVolumePriorityCnv.cpp b/castor/db/cnv/DbVolumePriorityCnv.cpp index 708fe925a36b8e2de55afca919f463e6d1014def..a3d16a5fe36c5d51855f1926508210afc9f3265c 100644 --- a/castor/db/cnv/DbVolumePriorityCnv.cpp +++ b/castor/db/cnv/DbVolumePriorityCnv.cpp @@ -136,7 +136,7 @@ void castor::db::cnv::DbVolumePriorityCnv::fillRep(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VolumePriority* obj = dynamic_cast<castor::vdqm::VolumePriority*>(object); try { @@ -166,7 +166,7 @@ void castor::db::cnv::DbVolumePriorityCnv::fillObj(castor::IAddress*, castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VolumePriority* obj = dynamic_cast<castor::vdqm::VolumePriority*>(object); switch (type) { @@ -189,7 +189,7 @@ void castor::db::cnv::DbVolumePriorityCnv::createRep(castor::IAddress*, castor::IObject* object, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::VolumePriority* obj = dynamic_cast<castor::vdqm::VolumePriority*>(object); // check whether something needs to be done @@ -248,7 +248,7 @@ void castor::db::cnv::DbVolumePriorityCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int) - throw (castor::exception::Exception) { + { // check whether something needs to be done int nb = objects.size(); if (0 == nb) return; @@ -495,7 +495,7 @@ void castor::db::cnv::DbVolumePriorityCnv::bulkCreateRep(castor::IAddress*, void castor::db::cnv::DbVolumePriorityCnv::updateRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VolumePriority* obj = dynamic_cast<castor::vdqm::VolumePriority*>(object); // check whether something needs to be done @@ -540,7 +540,7 @@ void castor::db::cnv::DbVolumePriorityCnv::updateRep(castor::IAddress*, void castor::db::cnv::DbVolumePriorityCnv::deleteRep(castor::IAddress*, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception) { + { castor::vdqm::VolumePriority* obj = dynamic_cast<castor::vdqm::VolumePriority*>(object); // check whether something needs to be done @@ -575,7 +575,7 @@ void castor::db::cnv::DbVolumePriorityCnv::deleteRep(castor::IAddress*, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::db::cnv::DbVolumePriorityCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::BaseAddress* ad = dynamic_cast<castor::BaseAddress*>(address); try { @@ -622,7 +622,7 @@ castor::IObject* castor::db::cnv::DbVolumePriorityCnv::createObj(castor::IAddres //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::db::cnv::DbVolumePriorityCnv::bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { // Prepare result std::vector<castor::IObject*> res; // check whether something needs to be done @@ -679,7 +679,7 @@ castor::db::cnv::DbVolumePriorityCnv::bulkCreateObj(castor::IAddress* address) // updateObj //------------------------------------------------------------------------------ void castor::db::cnv::DbVolumePriorityCnv::updateObj(castor::IObject* obj) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_selectStatement) { diff --git a/castor/db/cnv/DbVolumePriorityCnv.hpp b/castor/db/cnv/DbVolumePriorityCnv.hpp index b89d9ef24eb02f5f1a3875fedcc5ecd25c7bbda9..a9f8c20b77250e0027d576e9815f3127393c671e 100644 --- a/castor/db/cnv/DbVolumePriorityCnv.hpp +++ b/castor/db/cnv/DbVolumePriorityCnv.hpp @@ -87,7 +87,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates foreign representation from a set of C++ Objects. @@ -105,7 +105,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -119,7 +119,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -133,7 +133,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -145,7 +145,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -157,7 +157,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual std::vector<castor::IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. @@ -165,7 +165,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects.refered by a given C++ @@ -181,7 +181,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Retrieve from the database some of the objects refered by a given object. @@ -193,7 +193,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/ora/OraCnvSvc.cpp b/castor/db/ora/OraCnvSvc.cpp index e07dfb57e354a667abca40ec4d8537c35eba74b1..19b728a9995ff431853222ad058dbb20d54b3026 100644 --- a/castor/db/ora/OraCnvSvc.cpp +++ b/castor/db/ora/OraCnvSvc.cpp @@ -101,7 +101,7 @@ unsigned int castor::db::ora::OraCnvSvc::getPhysRepType() const { // getConnection //------------------------------------------------------------------------------ oracle::occi::Connection* castor::db::ora::OraCnvSvc::getConnection() - throw (castor::exception::Exception) { + { // Quick answer if connection available if (0 != m_connection) return m_connection; @@ -311,7 +311,7 @@ void castor::db::ora::OraCnvSvc::reset() throw() { // commit //------------------------------------------------------------------------------ void castor::db::ora::OraCnvSvc::commit() - throw (castor::exception::Exception) { + { try { if (0 != m_connection) { m_connection->commit(); @@ -328,7 +328,7 @@ void castor::db::ora::OraCnvSvc::commit() // rollback //------------------------------------------------------------------------------ void castor::db::ora::OraCnvSvc::rollback() - throw (castor::exception::Exception) { + { try { if (0 != m_connection) { m_connection->rollback(); @@ -345,7 +345,7 @@ void castor::db::ora::OraCnvSvc::rollback() // createStatement - the real one! //------------------------------------------------------------------------------ castor::db::IDbStatement* castor::db::ora::OraCnvSvc::createStatement(const std::string& stmt) - throw (castor::exception::Exception) { + { try { oracle::occi::Statement* statement = getConnection()->createStatement(stmt); return new castor::db::ora::OraStatement(statement, this); @@ -363,7 +363,7 @@ castor::db::IDbStatement* castor::db::ora::OraCnvSvc::createStatement(const std: // createOraStatement - for Oracle specific statements //------------------------------------------------------------------------------ oracle::occi::Statement* castor::db::ora::OraCnvSvc::createOraStatement(const std::string& stmt) - throw (castor::exception::Exception) { + { try { oracle::occi::Statement* oraStmt = getConnection()->createStatement(stmt); return oraStmt; @@ -382,7 +382,7 @@ oracle::occi::Statement* castor::db::ora::OraCnvSvc::createOraStatement(const st oracle::occi::Statement* castor::db::ora::OraCnvSvc::createOrReuseOraStatement (const std::string& stmtStr, bool *wasCreated) - throw (castor::exception::Exception) + { *wasCreated = false; std::map<std::string, oracle::occi::Statement*>::iterator it = @@ -401,7 +401,7 @@ castor::db::ora::OraCnvSvc::createOrReuseOraStatement (const std::string& stmtSt // terminateStatement //------------------------------------------------------------------------------ void castor::db::ora::OraCnvSvc::terminateStatement(oracle::occi::Statement* oraStmt) - throw (castor::exception::Exception) { + { try { if(0 == m_connection) { castor::exception::SQLError ex; diff --git a/castor/db/ora/OraCnvSvc.hpp b/castor/db/ora/OraCnvSvc.hpp index 28f96bb3a68a6854d5ae1b4a3c078771001f457a..a4d7c64cb1d379a5b2068372390fc63f0c50e1d2 100644 --- a/castor/db/ora/OraCnvSvc.hpp +++ b/castor/db/ora/OraCnvSvc.hpp @@ -75,14 +75,14 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual void commit() - throw (castor::exception::Exception); + ; /** * Forces the rollback of the last changes * @exception Exception throws an Exception in case of error */ virtual void rollback() - throw (castor::exception::Exception); + ; /** * Creates an Oracle prepared statement wrapped with the @@ -90,7 +90,7 @@ namespace castor { * @param stmt the string statement to be prepared */ virtual castor::db::IDbStatement* createStatement(const std::string& stmt) - throw (castor::exception::Exception); + ; /** * Creates an Oracle prepared statement exposed with the Oracle API @@ -100,7 +100,7 @@ namespace castor { */ oracle::occi::Statement* createOraStatement(const std::string& stmt) - throw (castor::exception::Exception); + ; /** * Creates or reuses an Oracle prepared statement exposed with the Oracle API. @@ -114,7 +114,7 @@ namespace castor { */ oracle::occi::Statement* createOrReuseOraStatement(const std::string& stmtStr, bool *wasCreated) - throw (castor::exception::Exception); + ; /** * Terminates a prepared statement created with the Oracle API @@ -124,7 +124,7 @@ namespace castor { * the DB connection was not initialized. */ void terminateStatement(oracle::occi::Statement* oraStmt) - throw (castor::exception::Exception); + ; /** * Resets the service. In particular, drops the connection to the database @@ -150,7 +150,7 @@ namespace castor { * when the connection couldn't be established */ oracle::occi::Connection* getConnection() - throw (castor::exception::Exception); + ; /// Oracle user name std::string m_user; diff --git a/castor/db/ora/OraCommonSvc.cpp b/castor/db/ora/OraCommonSvc.cpp index d55319ccf146680a2a27292ee48aba1c3f5f4dd7..4d72aa36947fe7b01f5f18be1cf415fd7d54d210 100644 --- a/castor/db/ora/OraCommonSvc.cpp +++ b/castor/db/ora/OraCommonSvc.cpp @@ -120,7 +120,7 @@ void castor::db::ora::OraCommonSvc::reset() throw() { //------------------------------------------------------------------------------ castor::stager::Request* castor::db::ora::OraCommonSvc::requestToDo(std::string service) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_requestToDoStatement) { @@ -207,7 +207,7 @@ void castor::db::ora::OraCommonSvc::rollback() { // handleException //------------------------------------------------------------------------------ void castor::db::ora::OraCommonSvc::handleException - (oracle::occi::SQLException& e) throw () { + (oracle::occi::SQLException& e) throw() { try { dynamic_cast<castor::db::ora::OraCnvSvc*>(cnvSvc())->handleException(e); } catch (castor::exception::Exception &) { @@ -223,7 +223,7 @@ void castor::db::ora::OraCommonSvc::handleException //------------------------------------------------------------------------------ oracle::occi::Statement* castor::db::ora::OraCommonSvc::createStatement (const std::string &stmtString) - throw (castor::exception::Exception) { + { return dynamic_cast<castor::db::ora::OraCnvSvc*>(cnvSvc())->createOraStatement(stmtString); } @@ -231,6 +231,6 @@ castor::db::ora::OraCommonSvc::createStatement (const std::string &stmtString) // deleteStatement - for Oracle specific statements //------------------------------------------------------------------------------ void castor::db::ora::OraCommonSvc::deleteStatement(oracle::occi::Statement* stmt) - throw (castor::exception::Exception) { + { dynamic_cast<castor::db::ora::OraCnvSvc*>(cnvSvc())->terminateStatement(stmt); } diff --git a/castor/db/ora/OraCommonSvc.hpp b/castor/db/ora/OraCommonSvc.hpp index a2ca830256b33e1b917a55549d87064e5b1d4e3a..f5f64bc38650b68901d70d771be763d98ab1b0e0 100644 --- a/castor/db/ora/OraCommonSvc.hpp +++ b/castor/db/ora/OraCommonSvc.hpp @@ -72,7 +72,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); public: @@ -85,7 +85,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::Request* requestToDo(std::string service) - throw (castor::exception::Exception); + ; protected: @@ -103,19 +103,19 @@ namespace castor { * Helper method to handle exceptions - see OraCnvSvc * @param e an Oracle exception */ - void handleException(oracle::occi::SQLException& e) throw (); + void handleException(oracle::occi::SQLException& e) throw(); /** * helper method to create Oracle statement */ virtual oracle::occi::Statement* createStatement(const std::string& stmtString) - throw (castor::exception::Exception); + ; /** * helper method to delete Oracle statement */ virtual void deleteStatement(oracle::occi::Statement* stmt) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/ora/OraGCSvc.cpp b/castor/db/ora/OraGCSvc.cpp index f60985849de9a79d6a298d448a009d8ae70b494d..8e5ae74e620e1d5379dfc16fd6adc60fef6b85ef 100644 --- a/castor/db/ora/OraGCSvc.cpp +++ b/castor/db/ora/OraGCSvc.cpp @@ -176,7 +176,7 @@ void castor::db::ora::OraGCSvc::reset() throw() { //------------------------------------------------------------------------------ std::vector<castor::stager::GCLocalFile*>* castor::db::ora::OraGCSvc::selectFiles2Delete(std::string diskServer) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_selectFiles2DeleteStatement) { m_selectFiles2DeleteStatement = @@ -239,7 +239,7 @@ castor::db::ora::OraGCSvc::selectFiles2Delete(std::string diskServer) //------------------------------------------------------------------------------ void castor::db::ora::OraGCSvc::filesDeleted (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_filesDeletedStatement) { m_filesDeletedStatement = @@ -397,7 +397,7 @@ void castor::db::ora::OraGCSvc::filesDeleted //------------------------------------------------------------------------------ void castor::db::ora::OraGCSvc::filesDeletionFailed (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_filesDeletionFailedStatement) { m_filesDeletionFailedStatement = @@ -602,7 +602,7 @@ std::vector<u_signed64> castor::db::ora::OraGCSvc::stgFilesDeleted // removeTerminatedRequests //------------------------------------------------------------------------------ void castor::db::ora::OraGCSvc::removeTerminatedRequests() - throw (castor::exception::Exception) { + { try { if (0 == m_removeTerminatedRequestsStatement) { m_removeTerminatedRequestsStatement = diff --git a/castor/db/ora/OraGCSvc.hpp b/castor/db/ora/OraGCSvc.hpp index bc9a093df5ac0be043fa1b9326e3e322690a00b5..c02366afd146c2d661b8200a172f446af889daab 100644 --- a/castor/db/ora/OraGCSvc.hpp +++ b/castor/db/ora/OraGCSvc.hpp @@ -68,7 +68,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); public: @@ -87,7 +87,7 @@ namespace castor { */ virtual std::vector<castor::stager::GCLocalFile*>* selectFiles2Delete(std::string diskServer) - throw (castor::exception::Exception); + ; /** * Informs the stager of files effectively deleted. @@ -100,7 +100,7 @@ namespace castor { */ virtual void filesDeleted (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception); + ; /** * Informs the stager of files for which deletion failed. @@ -111,7 +111,7 @@ namespace castor { */ virtual void filesDeletionFailed (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception); + ; /** * Handles a set of files that were deleted from @@ -141,7 +141,7 @@ namespace castor { * The timeout is retrieved from the configuration table in the db */ virtual void removeTerminatedRequests() - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/ora/OraJobSvc.cpp b/castor/db/ora/OraJobSvc.cpp index 6348960a18790b49f5ac74a40ac7075e6f189c49..5c205b6647ef0e884e2b6b056159e4df2f9d10e9 100644 --- a/castor/db/ora/OraJobSvc.cpp +++ b/castor/db/ora/OraJobSvc.cpp @@ -161,7 +161,7 @@ castor::db::ora::OraJobSvc::getUpdateStart bool* emptyFile, u_signed64, const std::string) - throw (castor::exception::Exception) { + { *emptyFile = false; try { // Check whether the statements are ok @@ -218,7 +218,7 @@ castor::db::ora::OraJobSvc::putStart std::string mountPoint, u_signed64, const std::string) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_putStartStatement) { @@ -271,7 +271,7 @@ void castor::db::ora::OraJobSvc::prepareForMigration const std::string, const std::string csumtype, const std::string csumvalue) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_putEndedStatement) { @@ -320,7 +320,7 @@ void castor::db::ora::OraJobSvc::getUpdateDone (u_signed64 subReqId, u_signed64, const std::string) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_getEndedStatement) { m_getEndedStatement = @@ -350,7 +350,7 @@ void castor::db::ora::OraJobSvc::getUpdateFailed (u_signed64 subReqId, u_signed64, const std::string) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_getEndedStatement) { m_getEndedStatement = @@ -380,7 +380,7 @@ void castor::db::ora::OraJobSvc::putFailed (u_signed64 subReqId, u_signed64, const std::string) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_putEndedStatement) { m_putEndedStatement = @@ -418,7 +418,7 @@ void castor::db::ora::OraJobSvc::firstByteWritten (u_signed64 subRequestId, u_signed64, const std::string) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_firstByteWrittenStatement) { diff --git a/castor/db/ora/OraJobSvc.hpp b/castor/db/ora/OraJobSvc.hpp index f667c942cac939264e731be18f847ded203e79bc..13d4311f8cce128e0f5aad847425bd95ae06d166 100644 --- a/castor/db/ora/OraJobSvc.hpp +++ b/castor/db/ora/OraJobSvc.hpp @@ -69,7 +69,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); public: @@ -94,7 +94,7 @@ namespace castor { bool* emptyFile, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Handles the start of a Put job. @@ -112,7 +112,7 @@ namespace castor { std::string mountPoint, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Prepares a file for migration, when needed. @@ -142,7 +142,7 @@ namespace castor { const std::string nsHost, const std::string csumtype="", const std::string csumvalue="") - throw (castor::exception::Exception); + ; /** * Informs the stager the a Get or Update SubRequest @@ -158,7 +158,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Informs the stager the a Get or Update SubRequest @@ -173,7 +173,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Informs the stager the a Put SubRequest failed. @@ -187,7 +187,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Informs the stager that an update subrequest has written @@ -203,7 +203,7 @@ namespace castor { (u_signed64 subRequestId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/ora/OraQuerySvc.cpp b/castor/db/ora/OraQuerySvc.cpp index f8e80de6b5f3c87d339a3e29a4acee801de2654f..1c1b6b0652bd112b02d1af22acfa9d8b90ed972f 100644 --- a/castor/db/ora/OraQuerySvc.cpp +++ b/castor/db/ora/OraQuerySvc.cpp @@ -144,7 +144,7 @@ void castor::db::ora::OraQuerySvc::reset() throw() { //------------------------------------------------------------------------------ std::list<castor::stager::StageQueryResult*>* castor::db::ora::OraQuerySvc::gatherResults(oracle::occi::ResultSet *rset) - throw (oracle::occi::SQLException) { + { // Gather the results std::list<castor::stager::StageQueryResult*>* result = new std::list<castor::stager::StageQueryResult*>(); @@ -177,7 +177,7 @@ castor::db::ora::OraQuerySvc::gatherResults(oracle::occi::ResultSet *rset) std::list<castor::stager::StageQueryResult*>* castor::db::ora::OraQuerySvc::diskCopies4FileName (std::string fileName, u_signed64 svcClassId, unsigned euid, unsigned egid) - throw (castor::exception::Exception) { + { // default value for the maximal number of responses to give unsigned long maxNbResponses = 10000; try { @@ -256,7 +256,7 @@ std::list<castor::stager::StageQueryResult*>* castor::db::ora::OraQuerySvc::diskCopies4File (u_signed64 fileId, std::string nsHost, u_signed64 svcClassId, unsigned euid, unsigned egid, std::string& fileName) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_diskCopies4FileStatement) { @@ -299,7 +299,7 @@ castor::db::ora::OraQuerySvc::diskCopies4File std::list<castor::stager::StageQueryResult*>* castor::db::ora::OraQuerySvc::diskCopies4Request (castor::stager::RequestQueryType reqType, std::string param, u_signed64 svcClassId) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if(0 == m_diskCopies4ReqIdStatement) { @@ -385,7 +385,7 @@ castor::db::ora::OraQuerySvc::describeDiskPools unsigned long egid, bool detailed, enum castor::query::DiskPoolQueryType queryType) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if(0 == m_describeDiskPoolsStatement) { @@ -487,7 +487,7 @@ castor::db::ora::OraQuerySvc::describeDiskPool std::string svcClass, bool detailed, enum castor::query::DiskPoolQueryType queryType) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if(0 == m_describeDiskPoolStatement) { diff --git a/castor/db/ora/OraQuerySvc.hpp b/castor/db/ora/OraQuerySvc.hpp index 9d2b6f52d3998cd746180c3c480b363e85fd50f1..2d7639dc28f486bfb44d23f702a02013087405c5 100644 --- a/castor/db/ora/OraQuerySvc.hpp +++ b/castor/db/ora/OraQuerySvc.hpp @@ -78,7 +78,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); public: @@ -105,7 +105,7 @@ namespace castor { u_signed64 svcClassId, unsigned euid, unsigned egid) - throw (castor::exception::Exception); + ; /** * Gets all DiskCopies for a given file. @@ -126,7 +126,7 @@ namespace castor { unsigned euid, unsigned egid, std::string& fileName) - throw (castor::exception::Exception); + ; /** * Gets all DiskCopies for a given request by reqId or userTag. @@ -148,7 +148,7 @@ namespace castor { diskCopies4Request (castor::stager::RequestQueryType reqType, std::string param, u_signed64 svcClassId) - throw (castor::exception::Exception); + ; /** * Lists diskpools and give details on their machine/filesystems @@ -169,7 +169,7 @@ namespace castor { unsigned long egid, bool detailed, enum castor::query::DiskPoolQueryType queryType) - throw (castor::exception::Exception); + ; /** * Give details on the machines/filesystems of a given diskpool @@ -188,7 +188,7 @@ namespace castor { std::string svcClass, bool detailed, enum castor::query::DiskPoolQueryType queryType) - throw (castor::exception::Exception); + ; private: @@ -243,7 +243,7 @@ namespace castor { /// Private function to parse and return the list of results std::list<castor::stager::StageQueryResult*>* gatherResults(oracle::occi::ResultSet *rset) - throw (oracle::occi::SQLException); + ; }; // end of class OraQuerySvc diff --git a/castor/db/ora/OraRHSvc.cpp b/castor/db/ora/OraRHSvc.cpp index edb51aed8fc565ed7ab3bfbb90d975f8b88e4da7..ca379199ba62ebafc4e5b6eae58fc5e1f21b5552 100644 --- a/castor/db/ora/OraRHSvc.cpp +++ b/castor/db/ora/OraRHSvc.cpp @@ -227,7 +227,7 @@ void castor::db::ora::OraRHSvc::reset() throw() { //------------------------------------------------------------------------------ void castor::db::ora::OraRHSvc::storeRequest (castor::stager::Request* req) - throw (castor::exception::Exception) { + { try { // get the corresponding client object castor::rh::Client* client = dynamic_cast<castor::rh::Client*>(req->client()); @@ -1337,7 +1337,7 @@ void castor::db::ora::OraRHSvc::changePrivilege std::vector<castor::bwlist::BWUser*> users, std::vector<castor::bwlist::RequestType*> requestTypes, bool isAdd) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (isAdd){ @@ -1422,7 +1422,7 @@ std::vector<castor::bwlist::Privilege*> castor::db::ora::OraRHSvc::listPrivileges (const std::string svcClassName, const int user, const int group, const int requestType) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_listPrivilegesStatement) { diff --git a/castor/db/ora/OraRHSvc.hpp b/castor/db/ora/OraRHSvc.hpp index 461523ea79e36eb57aa4cd7ed05a81275e3069c1..44e98f709c2d2e9ecd6ed1e0bb514622b85d835f 100644 --- a/castor/db/ora/OraRHSvc.hpp +++ b/castor/db/ora/OraRHSvc.hpp @@ -97,7 +97,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); public: @@ -107,7 +107,7 @@ namespace castor { * @exception throws Exception in case of errors, in particular in case of permission denial */ virtual void storeRequest(castor::stager::Request* req) - throw (castor::exception::Exception); + ; /** * stores a simple request into the stager DB. @@ -271,7 +271,7 @@ namespace castor { std::vector<castor::bwlist::BWUser*> users, std::vector<castor::bwlist::RequestType*> requestTypes, bool isAdd) - throw (castor::exception::Exception); + ; /** * list privileges @@ -292,7 +292,7 @@ namespace castor { listPrivileges (const std::string svcClassName, const int user, const int group, const int requestType) - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/ora/OraResultSet.cpp b/castor/db/ora/OraResultSet.cpp index 4a2fce7d2e852e03985e7ff813cc06a4385f28a5..1053a75f236af7d45a0ea1148d33843908f6d2dc 100644 --- a/castor/db/ora/OraResultSet.cpp +++ b/castor/db/ora/OraResultSet.cpp @@ -41,7 +41,7 @@ castor::db::ora::OraResultSet::~OraResultSet() { } bool castor::db::ora::OraResultSet::next(int count) - throw (castor::exception::SQLError) { + { try { return (m_rset->next(count) != oracle::occi::ResultSet::END_OF_FETCH); } @@ -55,7 +55,7 @@ bool castor::db::ora::OraResultSet::next(int count) } int castor::db::ora::OraResultSet::getInt(int i) - throw (castor::exception::SQLError) { + { try { return m_rset->getInt(i); } @@ -68,7 +68,7 @@ int castor::db::ora::OraResultSet::getInt(int i) } signed64 castor::db::ora::OraResultSet::getInt64(int i) - throw (castor::exception::SQLError) { + { try { return (signed64)m_rset->getDouble(i); } @@ -81,7 +81,7 @@ signed64 castor::db::ora::OraResultSet::getInt64(int i) } u_signed64 castor::db::ora::OraResultSet::getUInt64(int i) - throw (castor::exception::SQLError) { + { try { return (u_signed64)m_rset->getDouble(i); } @@ -94,7 +94,7 @@ u_signed64 castor::db::ora::OraResultSet::getUInt64(int i) } float castor::db::ora::OraResultSet::getFloat(int i) - throw (castor::exception::SQLError) { + { try { return m_rset->getFloat(i); } @@ -107,7 +107,7 @@ float castor::db::ora::OraResultSet::getFloat(int i) } double castor::db::ora::OraResultSet::getDouble(int i) - throw (castor::exception::SQLError) { + { try { return m_rset->getDouble(i); } @@ -120,7 +120,7 @@ double castor::db::ora::OraResultSet::getDouble(int i) } std::string castor::db::ora::OraResultSet::getString(int i) - throw (castor::exception::SQLError) { + { try { return m_rset->getString(i); } @@ -133,7 +133,7 @@ std::string castor::db::ora::OraResultSet::getString(int i) } std::string castor::db::ora::OraResultSet::getClob(int i) - throw (castor::exception::Exception) { + { try { oracle::occi::Clob clob = m_rset->getClob(i); clob.open(oracle::occi::OCCI_LOB_READONLY); @@ -160,7 +160,7 @@ std::string castor::db::ora::OraResultSet::getClob(int i) void castor::db::ora::OraResultSet::setDataBuffer (int pos, void* buffer, unsigned dbType, unsigned size, void* bufLen) - throw(castor::exception::SQLError) { + { if(dbType > DBTYPE_MAXVALUE) { castor::exception::SQLError ex; ex.getMessage() << "Invalid dbType: " << dbType; diff --git a/castor/db/ora/OraResultSet.hpp b/castor/db/ora/OraResultSet.hpp index 9561ef505651953f4a34673193b83d6d05d27458..534701542a113f41c65f689c6ee89101301ce8fb 100644 --- a/castor/db/ora/OraResultSet.hpp +++ b/castor/db/ora/OraResultSet.hpp @@ -55,25 +55,25 @@ namespace castor { /** * */ - virtual bool next(int count = 1) throw (castor::exception::SQLError); + virtual bool next(int count = 1) ; /** * * @param i */ - virtual int getInt(int i) throw (castor::exception::SQLError); - virtual signed64 getInt64(int i) throw (castor::exception::SQLError); - virtual u_signed64 getUInt64(int i) throw (castor::exception::SQLError); - virtual std::string getString(int i) throw (castor::exception::SQLError); - virtual std::string getClob(int i) throw (castor::exception::Exception); - virtual float getFloat(int i) throw (castor::exception::SQLError); - virtual double getDouble(int i) throw (castor::exception::SQLError); + virtual int getInt(int i) ; + virtual signed64 getInt64(int i) ; + virtual u_signed64 getUInt64(int i) ; + virtual std::string getString(int i) ; + virtual std::string getClob(int i) ; + virtual float getFloat(int i) ; + virtual double getDouble(int i) ; /** * */ virtual void setDataBuffer(int pos, void* buffer, unsigned dbType, unsigned size, void* bufLen) - throw (castor::exception::SQLError); + ; private: diff --git a/castor/db/ora/OraStagerSvc.cpp b/castor/db/ora/OraStagerSvc.cpp index 65c6d93e6ee4feef1d8045fb084430b7ef5b03cc..9780dcba41e2b238531d92491f8da8a4b3d52745 100644 --- a/castor/db/ora/OraStagerSvc.cpp +++ b/castor/db/ora/OraStagerSvc.cpp @@ -269,7 +269,7 @@ void castor::db::ora::OraStagerSvc::reset() throw() { castor::stager::SubRequest* castor::db::ora::OraStagerSvc::subRequestToDo (const std::string service) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_subRequestToDoStatement) { @@ -429,7 +429,7 @@ castor::db::ora::OraStagerSvc::subRequestToDo castor::IObject* castor::db::ora::OraStagerSvc::processBulkRequest (const std::string service) - throw (castor::exception::Exception) { + { IObject *retObj = 0; try { // Check whether the statements are ok @@ -514,7 +514,7 @@ castor::db::ora::OraStagerSvc::processBulkRequest //------------------------------------------------------------------------------ castor::stager::SubRequest* castor::db::ora::OraStagerSvc::subRequestFailedToDo() - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_subRequestFailedToDoStatement) { @@ -602,7 +602,7 @@ castor::db::ora::OraStagerSvc::subRequestFailedToDo() //------------------------------------------------------------------------------ int castor::db::ora::OraStagerSvc::processPrepareRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_processPrepareRequestStatement) { @@ -646,7 +646,7 @@ int castor::db::ora::OraStagerSvc::processPrepareRequest //------------------------------------------------------------------------------ int castor::db::ora::OraStagerSvc::processPutDoneRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_processPutDoneRequestStatement) { @@ -690,7 +690,7 @@ void castor::db::ora::OraStagerSvc::createDiskCopyReplicaRequest const castor::stager::SvcClass* srcSc, const castor::stager::SvcClass* destSc, const bool internal) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_createDiskCopyReplicaRequestStatement) { @@ -729,7 +729,7 @@ void castor::db::ora::OraStagerSvc::createDiskCopyReplicaRequest void castor::db::ora::OraStagerSvc::createEmptyFile (castor::stager::SubRequest* subreq, bool schedule) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_createEmptyFileStatement) { @@ -766,7 +766,7 @@ void castor::db::ora::OraStagerSvc::createEmptyFile //------------------------------------------------------------------------------ castor::stager::SubRequestStatusCodes castor::db::ora::OraStagerSvc::createRecallCandidate(u_signed64 srId) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_createRecallCandidateStatement) { @@ -797,7 +797,7 @@ castor::db::ora::OraStagerSvc::selectCastorFile(castor::stager::SubRequest* subr const Cns_fileid* cnsFileId, const Cns_filestatcs* cnsFileStat, const u_signed64 nsOpenTimeInUsec) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_selectCastorFileStatement) { m_selectCastorFileStatement = @@ -851,7 +851,7 @@ castor::db::ora::OraStagerSvc::selectCastorFile(castor::stager::SubRequest* subr //------------------------------------------------------------------------------ bool castor::db::ora::OraStagerSvc::updateAndCheckSubRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_updateAndCheckSubRequestStatement) { @@ -888,7 +888,7 @@ bool castor::db::ora::OraStagerSvc::updateAndCheckSubRequest //------------------------------------------------------------------------------ void castor::db::ora::OraStagerSvc::archiveSubReq (u_signed64 subReqId, castor::stager::SubRequestStatusCodes finalStatus) - throw (castor::exception::Exception) { + { // Check whether the statements are ok if (0 == m_archiveSubReqStatement) { m_archiveSubReqStatement = @@ -916,7 +916,7 @@ void castor::db::ora::OraStagerSvc::archiveSubReq int castor::db::ora::OraStagerSvc::stageRm (castor::stager::SubRequest* subreq, const u_signed64 fileId, const std::string nsHost, const u_signed64 svcClassId) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_stageRmStatement) { @@ -956,7 +956,7 @@ int castor::db::ora::OraStagerSvc::stageRm //------------------------------------------------------------------------------ void castor::db::ora::OraStagerSvc::renamedFileCleanup (const std::string &fileName, const u_signed64 subReqId) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_renamedFileCleanupStatement) { @@ -982,7 +982,7 @@ void castor::db::ora::OraStagerSvc::renamedFileCleanup int castor::db::ora::OraStagerSvc::setFileGCWeight (const u_signed64 fileId, const std::string nsHost, const u_signed64 svcClassId, const float weight) - throw (castor::exception::Exception) { + { try { // Check whether the statement is ok if (0 == m_setFileGCWeightStatement) { @@ -1015,7 +1015,7 @@ int castor::db::ora::OraStagerSvc::setFileGCWeight std::string castor::db::ora::OraStagerSvc::getConfigOption(std::string confClass, std::string confKey, std::string defaultValue) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_getConfigOptionStatement) { @@ -1048,7 +1048,7 @@ std::string castor::db::ora::OraStagerSvc::getConfigOption(std::string confClass // dumpDBLogs //------------------------------------------------------------------------------ void castor::db::ora::OraStagerSvc::dumpDBLogs() - throw (castor::exception::Exception) { + { try { if (0 == m_dumpDBLogsStatement) { m_dumpDBLogsStatement = createStatement(s_dumpDBLogsString); diff --git a/castor/db/ora/OraStagerSvc.hpp b/castor/db/ora/OraStagerSvc.hpp index dad4fb60ed4f1a2046d03990d53fb0e075399dc7..2759c01b5c80e2bb294c9226269dc5ee75b15e52 100644 --- a/castor/db/ora/OraStagerSvc.hpp +++ b/castor/db/ora/OraStagerSvc.hpp @@ -71,7 +71,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); public: @@ -88,7 +88,7 @@ namespace castor { */ virtual castor::stager::SubRequest* subRequestToDo (const std::string service) - throw (castor::exception::Exception); + ; /** * Selects and processes a bulk request. @@ -98,7 +98,7 @@ namespace castor { */ virtual castor::IObject* processBulkRequest (const std::string service) - throw (castor::exception::Exception); + ; /** * Selects the next SubRequest in FAILED status the stager @@ -109,7 +109,7 @@ namespace castor { * @exception Exception in case of system error */ virtual castor::stager::SubRequest* subRequestFailedToDo() - throw (castor::exception::Exception); + ; /** * Processes a PToGet, PToUpdate subrequest. @@ -119,7 +119,7 @@ namespace castor { */ virtual int processPrepareRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception); + ; /** * Processes a putDone subrequest. @@ -131,7 +131,7 @@ namespace castor { */ virtual int processPutDoneRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception); + ; /** * Create an internal request to trigger a diskcopy replication. @@ -149,7 +149,7 @@ namespace castor { const castor::stager::SvcClass* srcSc, const castor::stager::SvcClass* destSc, const bool internal = false) - throw (castor::exception::Exception); + ; /** * Retrieves a CastorFile from the database based on its fileId @@ -167,7 +167,7 @@ namespace castor { (castor::stager::SubRequest* subreq, const Cns_fileid* cnsFileId, const Cns_filestatcs* cnsFileStat, const u_signed64 nsOpenTimeInUsec) - throw (castor::exception::Exception); + ; /** * Updates a SubRequest status in the DB, including @@ -189,7 +189,7 @@ namespace castor { */ virtual bool updateAndCheckSubRequest (castor::stager::SubRequest *subreq) - throw (castor::exception::Exception); + ; /** * Archives a SubRequest @@ -201,7 +201,7 @@ namespace castor { */ virtual void archiveSubReq(u_signed64 subReqId, castor::stager::SubRequestStatusCodes finalStatus) - throw (castor::exception::Exception); + ; /** * Implements a single file stageRm. @@ -225,7 +225,7 @@ namespace castor { virtual int stageRm (castor::stager::SubRequest* subreq, const u_signed64 fileId, const std::string nsHost, const u_signed64 svcClassId) - throw (castor::exception::Exception); + ; /* * cleanups the stager DB in case of a stagerRm for a renamed file @@ -233,7 +233,7 @@ namespace castor { */ virtual void renamedFileCleanup (const std::string &fileName, const u_signed64 subReqId) - throw (castor::exception::Exception); + ; /** * Updates the gcWeight of some copies of a given file. @@ -250,7 +250,7 @@ namespace castor { virtual int setFileGCWeight (const u_signed64 fileId, const std::string nsHost, const u_signed64 svcClassId, const float weight) - throw (castor::exception::Exception); + ; /** * Creates an empty (i.e. 0 size) file in the DB. @@ -265,7 +265,7 @@ namespace castor { virtual void createEmptyFile (castor::stager::SubRequest* subreq, bool schedule) - throw (castor::exception::Exception); + ; /** * Triggers the recall of a file @@ -274,7 +274,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::SubRequestStatusCodes createRecallCandidate(u_signed64 srId) - throw (castor::exception::Exception); + ; /** * Gets a configuration option from the CastorConfig table @@ -288,14 +288,14 @@ namespace castor { virtual std::string getConfigOption(std::string confClass, std::string confKey, std::string defaultValue) - throw (castor::exception::Exception); + ; /** * Dumps the current logs from the db. * The content is logged in DLF and then deleted. */ virtual void dumpDBLogs() - throw (castor::exception::Exception); + ; private: diff --git a/castor/db/ora/OraStatement.cpp b/castor/db/ora/OraStatement.cpp index 8a088ed43eaddc4b9bf7f214ee36ff5307a64684..a7c892be1f24f7f4d273f07250bbb58a29b59970 100644 --- a/castor/db/ora/OraStatement.cpp +++ b/castor/db/ora/OraStatement.cpp @@ -154,7 +154,7 @@ void castor::db::ora::OraStatement::setNull(int pos) //------------------------------------------------------------------------------ void castor::db::ora::OraStatement::setDataBuffer (int pos, void* buffer, unsigned dbType, unsigned size, void* bufLens) - throw(castor::exception::SQLError) { + { if(dbType > DBTYPE_MAXVALUE) { castor::exception::SQLError ex; ex.getMessage() << "Invalid dbType: " << dbType; @@ -176,7 +176,7 @@ void castor::db::ora::OraStatement::setDataBuffer //------------------------------------------------------------------------------ void castor::db::ora::OraStatement::setDataBufferArray (int pos, void* buffer, unsigned dbType, unsigned size, unsigned elementSize, void* bufLens) - throw(castor::exception::Exception) { + { try { if (0 == m_arraySize) { m_arraySize = (ub4*) malloc(sizeof(ub4)); @@ -204,7 +204,7 @@ void castor::db::ora::OraStatement::setDataBufferArray //------------------------------------------------------------------------------ void castor::db::ora::OraStatement::setDataBufferUInt64Array (int pos, std::vector<u_signed64> data) - throw(castor::exception::Exception) { + { m_arrayPos = pos; // a dedicated method to handle u_signed64 arrays, i.e. arrays of ids unsigned int nb1 = data.size() == 0 ? 1 : data.size(); @@ -234,7 +234,7 @@ void castor::db::ora::OraStatement::setDataBufferUInt64Array // registerOutParam //------------------------------------------------------------------------------ void castor::db::ora::OraStatement::registerOutParam(int pos, unsigned dbType) - throw (castor::exception::SQLError) { + { if(dbType > DBTYPE_MAXVALUE) { castor::exception::SQLError ex; ex.getMessage() << "Invalid dbType: " << dbType; @@ -254,7 +254,7 @@ void castor::db::ora::OraStatement::registerOutParam(int pos, unsigned dbType) // getInt //------------------------------------------------------------------------------ int castor::db::ora::OraStatement::getInt(int pos) - throw (castor::exception::SQLError) { + { try { return m_statement->getInt(pos); } @@ -270,7 +270,7 @@ int castor::db::ora::OraStatement::getInt(int pos) // getInt64 //------------------------------------------------------------------------------ signed64 castor::db::ora::OraStatement::getInt64(int pos) - throw (castor::exception::SQLError) { + { try { return (signed64)m_statement->getDouble(pos); } @@ -286,7 +286,7 @@ signed64 castor::db::ora::OraStatement::getInt64(int pos) // getUInt64 //------------------------------------------------------------------------------ u_signed64 castor::db::ora::OraStatement::getUInt64(int pos) - throw (castor::exception::SQLError) { + { try { return (u_signed64)m_statement->getDouble(pos); } @@ -302,7 +302,7 @@ u_signed64 castor::db::ora::OraStatement::getUInt64(int pos) // getString //------------------------------------------------------------------------------ std::string castor::db::ora::OraStatement::getString(int pos) - throw (castor::exception::SQLError) { + { try { return m_statement->getString(pos); } @@ -318,7 +318,7 @@ std::string castor::db::ora::OraStatement::getString(int pos) // getFloat //------------------------------------------------------------------------------ float castor::db::ora::OraStatement::getFloat(int pos) - throw (castor::exception::SQLError) { + { try { return m_statement->getFloat(pos); } @@ -334,7 +334,7 @@ float castor::db::ora::OraStatement::getFloat(int pos) // getDouble //------------------------------------------------------------------------------ double castor::db::ora::OraStatement::getDouble(int pos) - throw (castor::exception::SQLError) { + { try { return m_statement->getDouble(pos); } @@ -350,7 +350,7 @@ double castor::db::ora::OraStatement::getDouble(int pos) // getClob //------------------------------------------------------------------------------ std::string castor::db::ora::OraStatement::getClob(int pos) - throw (castor::exception::Exception) { + { try { oracle::occi::Clob clob = m_statement->getClob(pos); clob.open(oracle::occi::OCCI_LOB_READONLY); @@ -378,7 +378,7 @@ std::string castor::db::ora::OraStatement::getClob(int pos) // getCursor //------------------------------------------------------------------------------ castor::db::IDbResultSet* castor::db::ora::OraStatement::getCursor(int pos) - throw (castor::exception::SQLError) { + { try { return new castor::db::ora::OraResultSet(m_statement->getCursor(pos), m_statement); } @@ -394,7 +394,7 @@ castor::db::IDbResultSet* castor::db::ora::OraStatement::getCursor(int pos) // executeQuery //------------------------------------------------------------------------------ castor::db::IDbResultSet* castor::db::ora::OraStatement::executeQuery() - throw (castor::exception::SQLError) { + { try { return new castor::db::ora::OraResultSet(m_statement->executeQuery(), m_statement); } @@ -413,7 +413,7 @@ castor::db::IDbResultSet* castor::db::ora::OraStatement::executeQuery() // execute //------------------------------------------------------------------------------ int castor::db::ora::OraStatement::execute(int count) - throw (castor::exception::Exception) { + { try { int ret = 0; if(count == 1) { diff --git a/castor/db/ora/OraStatement.hpp b/castor/db/ora/OraStatement.hpp index 7dc8547d623b645a34a3d355b5ba43f946457ea0..37446e1430141a94efa24bd324fbec321859147b 100644 --- a/castor/db/ora/OraStatement.hpp +++ b/castor/db/ora/OraStatement.hpp @@ -92,40 +92,40 @@ namespace castor { virtual void setNull(int pos); virtual void setDataBuffer(int pos, void* buffer, unsigned dbType, unsigned size, void* bufLens) - throw (castor::exception::SQLError); + ; virtual void setDataBufferArray(int pos, void* buffer, unsigned dbType, unsigned size, unsigned elementSize, void* bufLens) - throw (castor::exception::Exception); + ; virtual void setDataBufferUInt64Array(int pos, std::vector<u_signed64> data) - throw (castor::exception::Exception); + ; virtual void registerOutParam(int pos, unsigned dbType) - throw (castor::exception::SQLError); + ; /** * Getter methods * @param pos * @return value */ - virtual int getInt(int pos) throw (castor::exception::SQLError); - virtual signed64 getInt64(int pos) throw (castor::exception::SQLError); - virtual u_signed64 getUInt64(int pos) throw (castor::exception::SQLError); - virtual std::string getString(int pos) throw (castor::exception::SQLError); - virtual float getFloat(int pos) throw (castor::exception::SQLError); - virtual double getDouble(int pos) throw (castor::exception::SQLError); - virtual std::string getClob(int pos) throw (castor::exception::Exception); - virtual castor::db::IDbResultSet* getCursor(int pos) throw (castor::exception::SQLError); + virtual int getInt(int pos) ; + virtual signed64 getInt64(int pos) ; + virtual u_signed64 getUInt64(int pos) ; + virtual std::string getString(int pos) ; + virtual float getFloat(int pos) ; + virtual double getDouble(int pos) ; + virtual std::string getClob(int pos) ; + virtual castor::db::IDbResultSet* getCursor(int pos) ; /** * */ virtual IDbResultSet* executeQuery() - throw (castor::exception::SQLError); + ; virtual int execute(int count = 1) - throw (castor::exception::Exception); + ; inline oracle::occi::Statement* getStatementImpl() { return m_statement; diff --git a/castor/db/ora/OraVdqmSvc.cpp b/castor/db/ora/OraVdqmSvc.cpp index 19393aa1bc4db34d3ae35b925e3f4a49c1b1a9da..529b781319c16919c882826809bca06b1f84b26f 100644 --- a/castor/db/ora/OraVdqmSvc.cpp +++ b/castor/db/ora/OraVdqmSvc.cpp @@ -406,7 +406,7 @@ void castor::db::ora::OraVdqmSvc::rollback() { // ----------------------------------------------------------------------- castor::vdqm::VdqmTape* castor::db::ora::OraVdqmSvc::selectOrCreateTape(const std::string vid) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -527,7 +527,7 @@ castor::db::ora::OraVdqmSvc::selectOrCreateTape(const std::string vid) castor::vdqm::TapeServer* castor::db::ora::OraVdqmSvc::selectOrCreateTapeServer( const std::string serverName, bool withTapeDrives) - throw (castor::exception::Exception) { + { // Check if the parameter is empty if(serverName == "") { @@ -669,7 +669,7 @@ castor::vdqm::TapeServer* // ----------------------------------------------------------------------- bool castor::db::ora::OraVdqmSvc::checkTapeRequest( const castor::vdqm::TapeRequest *const newTapeRequest) - throw (castor::exception::Exception) { + { // Get the Statement objects, creating them if necessary oracle::occi::Statement *stmt1 = NULL; @@ -784,7 +784,7 @@ bool castor::db::ora::OraVdqmSvc::checkTapeRequest( // getQueuePosition // ----------------------------------------------------------------------- int castor::db::ora::OraVdqmSvc::getQueuePosition( - const u_signed64 tapeRequestId) throw (castor::exception::Exception) { + const u_signed64 tapeRequestId) { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -843,7 +843,7 @@ int castor::db::ora::OraVdqmSvc::getQueuePosition( void castor::db::ora::OraVdqmSvc::setVolPriority(const int priority, const int clientUID, const int clientGID, const std::string clientHost, const std::string vid, const int tpMode, const int lifespanType) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -894,7 +894,7 @@ void castor::db::ora::OraVdqmSvc::setVolPriority(const int priority, u_signed64 castor::db::ora::OraVdqmSvc::deleteVolPriority( const std::string vid, const int tpMode, const int lifespanType, int *const priority, int *const clientUID, int *const clientGID, - std::string *const clientHost) throw (castor::exception::Exception) { + std::string *const clientHost) { u_signed64 id = 0; @@ -957,7 +957,7 @@ u_signed64 castor::db::ora::OraVdqmSvc::deleteVolPriority( // deleteOldVolPriorities // ----------------------------------------------------------------------- unsigned int castor::db::ora::OraVdqmSvc::deleteOldVolPriorities( - const unsigned int maxAge) throw (castor::exception::Exception) { + const unsigned int maxAge) { unsigned int prioritiesDeletedVar = 0; @@ -1010,7 +1010,7 @@ unsigned int castor::db::ora::OraVdqmSvc::deleteOldVolPriorities( // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::getAllVolPriorities( std::list<castor::vdqm::IVdqmSvc::VolPriority> &priorities) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1086,7 +1086,7 @@ void castor::db::ora::OraVdqmSvc::getAllVolPriorities( // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::getEffectiveVolPriorities( std::list<castor::vdqm::IVdqmSvc::VolPriority> &priorities) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1162,7 +1162,7 @@ void castor::db::ora::OraVdqmSvc::getEffectiveVolPriorities( // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::getVolPriorities( std::list<castor::vdqm::IVdqmSvc::VolPriority> &priorities, - const int lifespanType) throw (castor::exception::Exception) { + const int lifespanType) { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1239,7 +1239,7 @@ void castor::db::ora::OraVdqmSvc::getVolPriorities( void castor::db::ora::OraVdqmSvc::getVolRequestsPriorityOrder( castor::vdqm::IVdqmSvc::VolRequestList &requests, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1329,7 +1329,7 @@ castor::vdqm::TapeDrive* castor::db::ora::OraVdqmSvc::selectTapeDrive( const vdqmDrvReq_t* driveRequest, castor::vdqm::TapeServer* tapeServer) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1439,7 +1439,7 @@ castor::vdqm::TapeDrive* // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::dedicateDrive(const std::string driveName, const std::string serverName, const std::string dgName, - const std::string dedicate) throw (castor::exception::Exception) { + const std::string dedicate) { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1509,7 +1509,7 @@ void castor::db::ora::OraVdqmSvc::dedicateDrive(const std::string driveName, // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::deleteDrive(std::string driveName, std::string serverName, std::string dgName) - throw (castor::exception::Exception){ + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1634,7 +1634,7 @@ bool castor::db::ora::OraVdqmSvc::requestSubmitted( int &requestStatusAfter, u_signed64 &requestDriveIdBefore, u_signed64 &requestDriveIdAfter) - throw (castor::exception::Exception) { + { bool result = false; @@ -1718,7 +1718,7 @@ void castor::db::ora::OraVdqmSvc::resetDriveAndRequest( int &requestStatusAfter, u_signed64 &requestDriveIdBefore, u_signed64 &requestDriveIdAfter) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1785,7 +1785,7 @@ void castor::db::ora::OraVdqmSvc::resetDriveAndRequest( bool castor::db::ora::OraVdqmSvc::existTapeDriveWithTapeInUse( const std::string volid) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1839,7 +1839,7 @@ bool bool castor::db::ora::OraVdqmSvc::existTapeDriveWithTapeMounted( const std::string volid) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1893,7 +1893,7 @@ bool castor::vdqm::VdqmTape* castor::db::ora::OraVdqmSvc::selectTapeByVid( const std::string volid) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -1975,7 +1975,7 @@ castor::vdqm::VdqmTape* castor::vdqm::TapeRequest* castor::db::ora::OraVdqmSvc::selectTapeReqForMountedTape( const castor::vdqm::TapeDrive* tapeDrive) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2074,7 +2074,7 @@ castor::vdqm::TapeRequest* castor::vdqm::TapeAccessSpecification* castor::db::ora::OraVdqmSvc::selectTapeAccessSpecification( const int accessMode, const std::string density, const std::string tapeModel) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2162,7 +2162,7 @@ castor::vdqm::TapeAccessSpecification* castor::vdqm::DeviceGroupName* castor::db::ora::OraVdqmSvc::selectDeviceGroupName (const std::string dgName) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2246,7 +2246,7 @@ castor::vdqm::DeviceGroupName* void castor::db::ora::OraVdqmSvc::getTapeRequestQueue( castor::vdqm::IVdqmSvc::VolReqMsgList &requests, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2355,7 +2355,7 @@ void castor::db::ora::OraVdqmSvc::getTapeRequestQueue( // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::getTapeDriveQueue(std::list<vdqmDrvReq_t> &drvReqs, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2470,7 +2470,7 @@ void castor::db::ora::OraVdqmSvc::getTapeDriveQueue(std::list<vdqmDrvReq_t> //------------------------------------------------------------------------------ int castor::db::ora::OraVdqmSvc::translateNewStatus( castor::vdqm::TapeDriveStatusCodes newStatusCode) - throw (castor::exception::Exception) { + { int oldStatus = 0; @@ -2523,7 +2523,7 @@ int castor::db::ora::OraVdqmSvc::translateNewStatus( // ----------------------------------------------------------------------- castor::vdqm::TapeRequest* castor::db::ora::OraVdqmSvc::selectTapeRequest( - const int volReqID) throw (castor::exception::Exception) { + const int volReqID) { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2610,7 +2610,7 @@ castor::vdqm::TapeRequest* // selectTapeRequestForUpdate // ----------------------------------------------------------------------- bool castor::db::ora::OraVdqmSvc::selectTapeRequestForUpdate( - const int volReqID) throw (castor::exception::Exception) { + const int volReqID) { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2665,7 +2665,7 @@ bool castor::db::ora::OraVdqmSvc::selectTapeRequestForUpdate( int castor::db::ora::OraVdqmSvc::allocateDrive(u_signed64 *tapeDriveId, std::string *tapeDriveName, u_signed64 *tapeRequestId, std::string *tapeRequestVid) - throw (castor::exception::Exception) { + { // 1 = drive allocated, 0 = no possible allocation found, -1 possible // allocation found, but invalidated by other threads @@ -2727,7 +2727,7 @@ int castor::db::ora::OraVdqmSvc::allocateDrive(u_signed64 *tapeDriveId, int castor::db::ora::OraVdqmSvc::reuseDriveAllocation( castor::vdqm::VdqmTape *const tape, castor::vdqm::TapeDrive *const drive, const int accessMode, u_signed64 *const tapeRequestId) - throw (castor::exception::Exception) { + { // 1 = driev allocation reused, 0 = no possible reuse found, -1 possible // reuse found, but invalidated by other threads @@ -2783,7 +2783,7 @@ int castor::db::ora::OraVdqmSvc::reuseDriveAllocation( // requestToSubmit // ----------------------------------------------------------------------- castor::vdqm::TapeRequest *castor::db::ora::OraVdqmSvc::requestToSubmit() - throw (castor::exception::Exception) { + { u_signed64 idTapeRequest = 0; @@ -2904,7 +2904,7 @@ castor::vdqm::TapeRequest *castor::db::ora::OraVdqmSvc::requestToSubmit() // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::selectCompatibilitiesForDriveModel( castor::vdqm::TapeDrive *const tapeDrive, const std::string tapeDriveModel) - throw (castor::exception::Exception) { + { // Get the Statement object, creating one if necessary oracle::occi::Statement *stmt = NULL; @@ -2978,7 +2978,7 @@ void castor::db::ora::OraVdqmSvc::selectCompatibilitiesForDriveModel( std::vector<castor::vdqm::TapeAccessSpecification*>* castor::db::ora::OraVdqmSvc::selectTapeAccessSpecifications( const std::string tapeModel) - throw (castor::exception::Exception) { + { //The result from the select statement oracle::occi::ResultSet *rset; @@ -3096,7 +3096,7 @@ castor::db::ora::OraVdqmSvc::handleException(oracle::occi::SQLException& e) { // ----------------------------------------------------------------------- oracle::occi::Statement* castor::db::ora::OraVdqmSvc::createStatement (const std::string &stmtString) - throw (castor::exception::Exception) { + { return dynamic_cast<castor::db::ora::OraCnvSvc*>(cnvSvc())->createOraStatement(stmtString); } @@ -3106,7 +3106,7 @@ castor::db::ora::OraVdqmSvc::createStatement (const std::string &stmtString) // ----------------------------------------------------------------------- void castor::db::ora::OraVdqmSvc::deleteStatement(oracle::occi::Statement* stmt) - throw (castor::exception::Exception) { + { castor::db::ora::OraStatement* oraStmt = new castor::db::ora::OraStatement(stmt, dynamic_cast<castor::db::ora::OraCnvSvc*>(cnvSvc())); delete oraStmt; diff --git a/castor/db/ora/OraVdqmSvc.hpp b/castor/db/ora/OraVdqmSvc.hpp index c97cf11ff26f5921f132c3fe0354ffd84393ba0f..519b5456fe39cec21715e16e24ba5ea855b7e21a 100644 --- a/castor/db/ora/OraVdqmSvc.hpp +++ b/castor/db/ora/OraVdqmSvc.hpp @@ -114,7 +114,7 @@ namespace castor { /** * Reset the converter statements. */ - void reset() throw (); + void reset() throw(); /** * See castor::vdqm::IVdqmSvc documentation. @@ -143,7 +143,7 @@ namespace castor { */ virtual castor::vdqm::TapeServer* selectOrCreateTapeServer (const std::string serverName, bool withTapeDrives) - throw (castor::exception::Exception); + ; /** * Checks, if there is already an entry for that tapeRequest. The entry @@ -154,7 +154,7 @@ namespace castor { */ virtual bool checkTapeRequest (const castor::vdqm::TapeRequest *const newTapeRequest) - throw (castor::exception::Exception); + ; /** * Returns the queue position of the tape request. @@ -165,7 +165,7 @@ namespace castor { * @exception in case of error */ virtual int getQueuePosition(const u_signed64 tapeRequestId) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. @@ -173,7 +173,7 @@ namespace castor { virtual void setVolPriority(const int priority, const int clientUID, const int clientGID, const std::string clientHost, const std::string vid, const int tpMode, const int lifespanType) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. @@ -181,41 +181,41 @@ namespace castor { virtual u_signed64 deleteVolPriority(const std::string vid, const int tpMode, const int lifespanType, int *const priority, int *const clientUID, int *const clientGID, - std::string *const clientHost) throw (castor::exception::Exception); + std::string *const clientHost) ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ virtual unsigned int deleteOldVolPriorities(const unsigned int maxAge) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ virtual void getAllVolPriorities( std::list<castor::vdqm::IVdqmSvc::VolPriority> &priorities) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ virtual void getEffectiveVolPriorities( std::list<castor::vdqm::IVdqmSvc::VolPriority> &priorities) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ virtual void getVolPriorities( std::list<castor::vdqm::IVdqmSvc::VolPriority> &priorities, - const int lifespanType) throw (castor::exception::Exception); + const int lifespanType) ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ virtual void getVolRequestsPriorityOrder(VolRequestList &requests, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception); + ; /** * Looks, wether the specific tape access exist in the db. If not the @@ -231,7 +231,7 @@ namespace castor { virtual castor::vdqm::TapeAccessSpecification* selectTapeAccessSpecification(const int accessMode, const std::string density, const std::string tapeModel) - throw (castor::exception::Exception); + ; /** * Looks, if the specified dgName exists in the database. @@ -244,7 +244,7 @@ namespace castor { */ virtual castor::vdqm::DeviceGroupName* selectDeviceGroupName (const std::string dgName) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. @@ -252,27 +252,27 @@ namespace castor { virtual void getTapeRequestQueue( castor::vdqm::IVdqmSvc::VolReqMsgList &requests, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ virtual void getTapeDriveQueue(std::list<vdqmDrvReq_t> &drvReqs, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ void dedicateDrive(const std::string driveName, const std::string serverName, const std::string dgName, - const std::string dedicate) throw (castor::exception::Exception); + const std::string dedicate) ; /** * See the documentation for castor::vdqm::IVdqmSvc. */ void deleteDrive(std::string driveName, std::string serverName, - std::string dgName) throw (castor::exception::Exception); + std::string dgName) ; /** * See the documentation for castor::vdqm::IVdqmSvc. @@ -290,7 +290,7 @@ namespace castor { int &requestStatusAfter, u_signed64 &requestDriveIdBefore, u_signed64 &requestDriveIdAfter) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. @@ -308,7 +308,7 @@ namespace castor { int &requestStatusAfter, u_signed64 &requestDriveIdBefore, u_signed64 &requestDriveIdAfter) - throw (castor::exception::Exception); + ; /** * See the documentation for castor::vdqm::IVdqmSvc. @@ -316,7 +316,7 @@ namespace castor { void selectCompatibilitiesForDriveModel( castor::vdqm::TapeDrive *const tapeDrive, const std::string tapeDriveModel) - throw (castor::exception::Exception); + ; /** * Selects from the TapeAccessSpecification table all entries for the @@ -330,19 +330,19 @@ namespace castor { */ virtual std::vector<castor::vdqm::TapeAccessSpecification*>* selectTapeAccessSpecifications(const std::string tapeModel) - throw (castor::exception::Exception); + ; /** * See castor::vdqm::IVdqmSvc documentation. */ virtual castor::vdqm::TapeRequest* selectTapeRequest( - const int volReqID) throw (castor::exception::Exception); + const int volReqID) ; /** * See castor::vdqm::IVdqmSvc documentation. */ virtual bool selectTapeRequestForUpdate(const int volReqID) - throw (castor::exception::Exception); + ; /** * See castor::vdqm::IVdqmSvc documentation. @@ -350,7 +350,7 @@ namespace castor { virtual int allocateDrive(u_signed64 *tapeDriveId, std::string *tapeDriveName, u_signed64 *tapeRequestId, std::string *tapeRequestVid) - throw (castor::exception::Exception); + ; /** * See castor::vdqm::IVdqmSvc documentation. @@ -359,13 +359,13 @@ namespace castor { castor::vdqm::VdqmTape *const tape, castor::vdqm::TapeDrive *const drive, const int accessMode, u_signed64 *const tapeRequestId) - throw (castor::exception::Exception); + ; /** * See castor::vdqm::IVdqmSvc documentation. */ virtual castor::vdqm::TapeRequest *requestToSubmit() - throw (castor::exception::Exception); + ; /** * Retrieves a tapeDrive from the database based on its struct @@ -383,7 +383,7 @@ namespace castor { virtual castor::vdqm::TapeDrive* selectTapeDrive (const vdqmDrvReq_t* driveRequest, castor::vdqm::TapeServer* tapeServer) - throw (castor::exception::Exception); + ; //------------ functions for TapeDriveStatusHandler ------------------ @@ -391,7 +391,7 @@ namespace castor { * See castor::vdqm::IVdqmSvc documentation. */ virtual castor::vdqm::VdqmTape* selectOrCreateTape( - const std::string vid) throw (castor::exception::Exception); + const std::string vid) ; /** * Check whether another request is currently @@ -406,7 +406,7 @@ namespace castor { * @return true if there is one */ virtual bool existTapeDriveWithTapeInUse(const std::string volid) - throw (castor::exception::Exception); + ; /** * Check whether the tape, specified by the vid is mounted @@ -418,7 +418,7 @@ namespace castor { * @return true if there is one */ virtual bool existTapeDriveWithTapeMounted(const std::string volid) - throw (castor::exception::Exception); + ; /** * Returns the tape with this vid @@ -429,7 +429,7 @@ namespace castor { * @return The found TapeDrive */ virtual castor::vdqm::VdqmTape* selectTapeByVid(const std::string vid) - throw (castor::exception::Exception); + ; /** * Looks through the tape requests, whether there is one for the @@ -442,7 +442,7 @@ namespace castor { */ virtual castor::vdqm::TapeRequest* selectTapeReqForMountedTape (const castor::vdqm::TapeDrive* tapeDrive) - throw (castor::exception::Exception); + ; /** * Inner class used to store a map of the SQL statment strings. @@ -496,7 +496,7 @@ namespace castor { */ virtual oracle::occi::Statement* createStatement(const std::string& stmtString) - throw (castor::exception::Exception); + ; /** * XXX to be removed when all statements are converted using @@ -504,7 +504,7 @@ namespace castor { * helper method to delete Oracle statement */ virtual void deleteStatement(oracle::occi::Statement* stmt) - throw (castor::exception::Exception); + ; /** * Translates the new status of a Tape drive into the old status @@ -515,7 +515,7 @@ namespace castor { * @exception In case of error */ int translateNewStatus(castor::vdqm::TapeDriveStatusCodes newStatusCode) - throw (castor::exception::Exception); + ; /** * Returns the Statement object corresponding to the specified diff --git a/castor/db/ora/SmartOcciResultSet.cpp b/castor/db/ora/SmartOcciResultSet.cpp index 21c3b3f34289313300a3d6fe62a17ec1a4fa114b..98697ed4d8840c003eeb876425698da2a0f1526e 100644 --- a/castor/db/ora/SmartOcciResultSet.cpp +++ b/castor/db/ora/SmartOcciResultSet.cpp @@ -34,7 +34,7 @@ castor::db::ora::SmartOcciResultSet::SmartOcciResultSet( oracle::occi::Statement *const statement, oracle::occi::ResultSet *const resultSet) - throw(castor::exception::Exception) : + : m_statement(statement), m_resultSet(resultSet), m_resultSetIsOpen(true) { @@ -47,7 +47,7 @@ castor::db::ora::SmartOcciResultSet::SmartOcciResultSet( "Failed to create SmartOcciResultSet" ": statement argument to the constructor is NULL"; - throw(ex); + throw ex; } if(resultSet == NULL) { castor::exception::Exception ex(EINVAL); @@ -56,7 +56,7 @@ castor::db::ora::SmartOcciResultSet::SmartOcciResultSet( "Failed to create SmartOcciResultSet" ": resultSet argument to the constructor is NULL"; - throw(ex); + throw ex; } } @@ -92,7 +92,7 @@ void castor::db::ora::SmartOcciResultSet::close() "Failed to close result-set" ": Result-set already closed"; - throw (ex); + throw ex; } m_statement->closeResultSet(m_resultSet); @@ -105,7 +105,7 @@ void castor::db::ora::SmartOcciResultSet::close() //----------------------------------------------------------------------------- oracle::occi::ResultSet *castor::db::ora::SmartOcciResultSet::operator->() const - throw(castor::exception::Exception) { + { return get(); } @@ -114,7 +114,7 @@ oracle::occi::ResultSet //----------------------------------------------------------------------------- oracle::occi::ResultSet *castor::db::ora::SmartOcciResultSet::get() const - throw(castor::exception::Exception) { + { // Throw an exception if if(!m_resultSetIsOpen) { @@ -124,7 +124,7 @@ oracle::occi::ResultSet "Failed to dereference SmartOcciResultSet" ": Owned result-set has been closed"; - throw(ex); + throw ex; } return m_resultSet; diff --git a/castor/db/ora/SmartOcciResultSet.hpp b/castor/db/ora/SmartOcciResultSet.hpp index 45f6cb1e50a77358a61bcfd1b06488a54fe298a2..5266b8d62758d84fd630deffbc85b9b1b1becf57 100644 --- a/castor/db/ora/SmartOcciResultSet.hpp +++ b/castor/db/ora/SmartOcciResultSet.hpp @@ -58,7 +58,7 @@ public: SmartOcciResultSet( oracle::occi::Statement *const statement, oracle::occi::ResultSet *const resultSet) - throw(castor::exception::Exception); + ; /** * Destructor. @@ -90,7 +90,7 @@ public: * This method throws an exception if the owned result set has been closed. */ oracle::occi::ResultSet *operator->() const - throw(castor::exception::Exception); + ; /** * Bypasses the smart pointer by returning the pointer to the owned @@ -99,7 +99,7 @@ public: * This method throws an exception if the owned result set has been closed. */ oracle::occi::ResultSet * get() const - throw(castor::exception::Exception); + ; private: diff --git a/castor/dlf/Dlf.cpp b/castor/dlf/Dlf.cpp index d41ea7ac26c47996318855deb075fd05189081f3..2fad8e2c8365fc9d3be96737e901240970ca3c51 100644 --- a/castor/dlf/Dlf.cpp +++ b/castor/dlf/Dlf.cpp @@ -44,7 +44,7 @@ castor::dlf::dlf_getPendingMessages () throw() { //----------------------------------------------------------------------------- void castor::dlf::dlf_init (const char* facilityName, castor::dlf::Message messages[]) - throw (castor::exception::Exception) { + { // Initialise the DLF interface if (::dlf_init(facilityName) != 0) { castor::exception::Exception ex; @@ -71,7 +71,7 @@ void castor::dlf::dlf_init // dlf_addMessages //----------------------------------------------------------------------------- void castor::dlf::dlf_addMessages (int offset, Message messages[]) - throw () { + throw() { if (::dlf_isinitialized()) { int i = 0; while (messages[i].number >= 0) { diff --git a/castor/dlf/Dlf.hpp b/castor/dlf/Dlf.hpp index 80041505d19a7774e0de802dda1b4558e8b49eac..afa39331b33b4a50a95878cd4abc4ccd53bfda38 100644 --- a/castor/dlf/Dlf.hpp +++ b/castor/dlf/Dlf.hpp @@ -102,7 +102,7 @@ namespace castor { */ void dlf_init(const char* facilityName, Message messages[]) - throw (castor::exception::Exception); + ; /** * Adds messages to the current DLF facility. diff --git a/castor/exception/Communication.hpp b/castor/exception/Communication.hpp index c8ed9101cdbd5772aa1fdeebf9af736c23cd9f7e..e103a16ad0a356e17bde027ee447d64fc7427262 100644 --- a/castor/exception/Communication.hpp +++ b/castor/exception/Communication.hpp @@ -50,7 +50,7 @@ namespace castor { * Empty Destructor, explicitely non-throwing (needed for std::exception * inheritance) */ - virtual ~Communication() throw () {} + virtual ~Communication() throw() {} std::string getRequestId(); diff --git a/castor/exception/InvalidConfigEntry.hpp b/castor/exception/InvalidConfigEntry.hpp index ffe54faaa37098e6d77b863e5e2910fbf42cc2e7..715885c270db6cfbdfa4ad7b6eff01ca145647af 100644 --- a/castor/exception/InvalidConfigEntry.hpp +++ b/castor/exception/InvalidConfigEntry.hpp @@ -52,7 +52,7 @@ namespace castor { namespace exception { * Trivial, but explicitely non-throwing destructor (required through * inheritence from std::exception) */ - virtual ~InvalidConfigEntry() throw () {}; + virtual ~InvalidConfigEntry() throw() {}; /** * Returns the category of the configuration entry. diff --git a/castor/exception/NoPortInRange.hpp b/castor/exception/NoPortInRange.hpp index bdeec92161675a0468767e3e34bcc25607359501..c2343835505421728d1f46d7b05ccae5e9104e84 100644 --- a/castor/exception/NoPortInRange.hpp +++ b/castor/exception/NoPortInRange.hpp @@ -52,7 +52,7 @@ public: * Empty Destructor, explicitely non-throwing (needed for std::exception * inheritance) */ - virtual ~NoPortInRange() throw () {} + virtual ~NoPortInRange() throw() {} /** * Returns the inclusive low port of the port number range. diff --git a/castor/gc/DeletionThread.cpp b/castor/gc/DeletionThread.cpp index 16eeef5fe3766176731f6ba721b1995ddb453a51..4ead703a121b21fd63bf91ae5b1947758c4bdfb5 100644 --- a/castor/gc/DeletionThread.cpp +++ b/castor/gc/DeletionThread.cpp @@ -279,7 +279,7 @@ void castor::gc::DeletionThread::run(void*) { //----------------------------------------------------------------------------- void castor::gc::DeletionThread::gcRemoveFilePath (std::string filepath, u_signed64 &filesize, u_signed64 &fileage) - throw (castor::exception::Exception) { + { struct stat64 fileinfo; if (::stat64(filepath.c_str(), &fileinfo) ) { castor::exception::Exception e(errno); diff --git a/castor/gc/DeletionThread.hpp b/castor/gc/DeletionThread.hpp index eb14a78e95d2e446a6d788ba1fc39e9fbe36a155..5edd507ebb39a360711850a4914e02624bf95a4b 100644 --- a/castor/gc/DeletionThread.hpp +++ b/castor/gc/DeletionThread.hpp @@ -76,7 +76,7 @@ namespace castor { */ void gcRemoveFilePath (std::string filepath, u_signed64 &filesize, u_signed64 &fileage) - throw (castor::exception::Exception); + ; private: diff --git a/castor/gc/SynchronizationThread.cpp b/castor/gc/SynchronizationThread.cpp index 19129f2b406a816ecb8080211354713f6e96b79e..99581095ddecb5873c470a3289cc87d05aad4c51 100644 --- a/castor/gc/SynchronizationThread.cpp +++ b/castor/gc/SynchronizationThread.cpp @@ -264,7 +264,7 @@ void castor::gc::SynchronizationThread::readConfigFile unsigned int *chunkSize, bool *disableStagerSync, bool firstTime) - throw(castor::exception::Exception) { + { // Synchronization interval char* value; @@ -347,7 +347,7 @@ void castor::gc::SynchronizationThread::readConfigFile //----------------------------------------------------------------------------- std::pair<std::string, u_signed64> castor::gc::SynchronizationThread::diskCopyIdFromFileName(std::string fileName) - throw (castor::exception::Exception) { + { // Locate the beginning of the nameserver host in the filename, this gives // us the fileid @@ -395,7 +395,7 @@ castor::gc::SynchronizationThread::diskCopyIdFromFileName(std::string fileName) //----------------------------------------------------------------------------- u_signed64 castor::gc::SynchronizationThread::fileIdFromFilePath(std::string filePath) - throw (castor::exception::Exception) { + { // Extract the filename std::string::size_type f = filePath.find_last_of('/', filePath.length()); @@ -433,7 +433,7 @@ castor::gc::SynchronizationThread::fileIdFromFilePath(std::string filePath) //----------------------------------------------------------------------------- std::set<std::string> castor::gc::SynchronizationThread::getFilesBeingWrittenTo(char* mountPoint) - throw(castor::exception::Exception) { + { std::set<std::string> files; // loop through the /proc/*/fd directories DIR *procDir = opendir("/proc"); diff --git a/castor/gc/SynchronizationThread.hpp b/castor/gc/SynchronizationThread.hpp index 3c107a882c7d8358db7c044a64ec973ea12d089e..7c296d13bc506b7c3a3de76e50ce84a0f1be5215 100644 --- a/castor/gc/SynchronizationThread.hpp +++ b/castor/gc/SynchronizationThread.hpp @@ -86,7 +86,7 @@ namespace castor { unsigned int *chunkSize, bool *disableStagerSync, bool firstTime = false) - throw(castor::exception::Exception); + ; /** * Parse a fileName and extract the diskCopyId @@ -97,7 +97,7 @@ namespace castor { */ std::pair<std::string, u_signed64> diskCopyIdFromFileName(std::string fileName) - throw (castor::exception::Exception); + ; /** * Parse a filePath and extract the fileId @@ -107,7 +107,7 @@ namespace castor { * syntax */ u_signed64 fileIdFromFilePath(std::string filePath) - throw (castor::exception::Exception); + ; /** * gets a list of files open for write in the given mountPoint @@ -115,7 +115,7 @@ namespace castor { * @throw exception in case of error */ std::set<std::string> getFilesBeingWrittenTo(char* mountPoint) - throw(castor::exception::Exception); + ; /** * Synchronizes a list of files from a given filesystem with the nameserver and stager catalog diff --git a/castor/io/AbstractSocket.cpp b/castor/io/AbstractSocket.cpp index 9f60a71330c67fec35d0c6e03c2a8ff890e05c45..19cd6210978dddaa01f57b6279223238acd4192c 100644 --- a/castor/io/AbstractSocket.cpp +++ b/castor/io/AbstractSocket.cpp @@ -49,7 +49,7 @@ //------------------------------------------------------------------------------ // constructor //------------------------------------------------------------------------------ -castor::io::AbstractSocket::AbstractSocket(int socket) throw () : +castor::io::AbstractSocket::AbstractSocket(int socket) throw() : m_socket(socket), m_reusable(true), m_timeout(DEFAULT_SOCKET_NETTIMEOUT), @@ -61,7 +61,7 @@ castor::io::AbstractSocket::AbstractSocket(int socket) throw () : // constructor //------------------------------------------------------------------------------ castor::io::AbstractSocket::AbstractSocket(const bool reusable) - throw (castor::exception::Exception) : + : m_socket(-1), m_reusable(reusable), m_timeout(DEFAULT_SOCKET_NETTIMEOUT), @@ -74,7 +74,7 @@ castor::io::AbstractSocket::AbstractSocket(const bool reusable) //------------------------------------------------------------------------------ castor::io::AbstractSocket::AbstractSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception) : + : m_socket(-1), m_reusable(reusable), m_timeout(DEFAULT_SOCKET_NETTIMEOUT), @@ -88,7 +88,7 @@ castor::io::AbstractSocket::AbstractSocket(const unsigned short port, castor::io::AbstractSocket::AbstractSocket(const unsigned short port, const std::string host, const bool reusable) - throw (castor::exception::Exception) : + : m_socket(-1), m_reusable(reusable), m_timeout(DEFAULT_SOCKET_NETTIMEOUT), @@ -102,7 +102,7 @@ castor::io::AbstractSocket::AbstractSocket(const unsigned short port, castor::io::AbstractSocket::AbstractSocket(const unsigned short port, const unsigned long ip, const bool reusable) - throw (castor::exception::Exception) : + : m_socket(-1), m_reusable(reusable), m_timeout(DEFAULT_SOCKET_NETTIMEOUT), @@ -113,7 +113,7 @@ castor::io::AbstractSocket::AbstractSocket(const unsigned short port, //------------------------------------------------------------------------------ // destructor //------------------------------------------------------------------------------ -castor::io::AbstractSocket::~AbstractSocket() throw () { +castor::io::AbstractSocket::~AbstractSocket() throw() { this->close(); } @@ -122,7 +122,7 @@ castor::io::AbstractSocket::~AbstractSocket() throw () { //------------------------------------------------------------------------------ void castor::io::AbstractSocket::getPortIp(unsigned short& port, unsigned long& ip) const - throw (castor::exception::Exception) { + { // get address unsigned int soutlen = sizeof(struct sockaddr_in); struct sockaddr_in sout; @@ -141,7 +141,7 @@ void castor::io::AbstractSocket::getPortIp(unsigned short& port, //------------------------------------------------------------------------------ void castor::io::AbstractSocket::getPeerIp(unsigned short& port, unsigned long& ip) const - throw (castor::exception::Exception) { + { // get address unsigned int soutlen = sizeof(struct sockaddr_in); struct sockaddr_in sout; @@ -159,7 +159,7 @@ void castor::io::AbstractSocket::getPeerIp(unsigned short& port, // Sets the socket to reusable address //------------------------------------------------------------------------------ void castor::io::AbstractSocket::setReusable() - throw (castor::exception::Exception) { + { if(!m_reusable) return; int on = 1; if (setsockopt(m_socket, SOL_SOCKET, SO_REUSEADDR, @@ -174,7 +174,7 @@ void castor::io::AbstractSocket::setReusable() // sendObject //------------------------------------------------------------------------------ void castor::io::AbstractSocket::sendObject(castor::IObject& obj) - throw(castor::exception::Exception) { + { // marshalls the object castor::io::biniostream buffer; castor::io::StreamAddress ad(buffer, "StreamCnvSvc", castor::SVC_STREAMCNV); @@ -189,7 +189,7 @@ void castor::io::AbstractSocket::sendObject(castor::IObject& obj) // readObject //------------------------------------------------------------------------------ castor::IObject* castor::io::AbstractSocket::readObject() - throw(castor::exception::Exception) { + { // reads from the socket char* buffer; int length; @@ -230,7 +230,7 @@ bool castor::io::AbstractSocket::isDataAvailable() throw() { // buildAddress //------------------------------------------------------------------------------ sockaddr_in castor::io::AbstractSocket::buildAddress(const unsigned short port) - throw (castor::exception::Exception) { + { // Builds the address struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); @@ -245,7 +245,7 @@ sockaddr_in castor::io::AbstractSocket::buildAddress(const unsigned short port) //------------------------------------------------------------------------------ sockaddr_in castor::io::AbstractSocket::buildAddress(const unsigned short port, const std::string host) - throw (castor::exception::Exception) { + { // get host information, reentrant in linux struct hostent *hp = Cgethostbyname(host.c_str()); if(hp == 0) { @@ -267,7 +267,7 @@ sockaddr_in castor::io::AbstractSocket::buildAddress(const unsigned short port, //------------------------------------------------------------------------------ sockaddr_in castor::io::AbstractSocket::buildAddress(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception) { + { // Builds the address struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); @@ -280,7 +280,7 @@ sockaddr_in castor::io::AbstractSocket::buildAddress(const unsigned short port, //------------------------------------------------------------------------------ // close //------------------------------------------------------------------------------ -void castor::io::AbstractSocket::close() throw () { +void castor::io::AbstractSocket::close() throw() { if (m_socket >= 0) { ::close(m_socket); } diff --git a/castor/io/AbstractSocket.hpp b/castor/io/AbstractSocket.hpp index 3695d7a12d4a680c630e0300dbbb1234a26826da..d7296178bc974524e5f460d4a9892e258af53bbf 100644 --- a/castor/io/AbstractSocket.hpp +++ b/castor/io/AbstractSocket.hpp @@ -51,7 +51,7 @@ namespace castor { * Constructor building a Socket objet around a regular socket * @param socket the regular socket used */ - AbstractSocket(int socket) throw (); + AbstractSocket(int socket) throw(); /** * Constructor building a socket with no port. As a consequence, @@ -61,7 +61,7 @@ namespace castor { * @exception Exception in case of error */ AbstractSocket(const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given local port @@ -72,7 +72,7 @@ namespace castor { */ AbstractSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -85,7 +85,7 @@ namespace castor { AbstractSocket(const unsigned short port, const std::string host, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -98,7 +98,7 @@ namespace castor { AbstractSocket(const unsigned short port, const unsigned long ip, const bool reusable) - throw (castor::exception::Exception); + ; /** * Destructor @@ -111,7 +111,7 @@ namespace castor { * @exception Exception in case of error */ void sendObject(castor::IObject& obj) - throw(castor::exception::Exception); + ; /** * Reads an object from the socket. @@ -121,7 +121,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::IObject* readObject() - throw(castor::exception::Exception); + ; /** * Check whether there is something to read on the socket @@ -135,19 +135,19 @@ namespace castor { */ void getPortIp(unsigned short& port, unsigned long& ip) const - throw (castor::exception::Exception); + ; /** * Retrieve peer name */ void getPeerIp(unsigned short& port, unsigned long& ip) const - throw (castor::exception::Exception); + ; /** * Sets the SO_REUSEADDR option on the socket */ - void setReusable() throw (castor::exception::Exception); + void setReusable() ; /** * Set the timeout value in seconds for reading and writing data @@ -182,7 +182,7 @@ namespace castor { /** * Closes the socket */ - void close() throw (); + void close() throw(); /** * To be deleted when Socket class is complete XXX @@ -204,27 +204,27 @@ namespace castor { /** * Internal method to create the inner socket */ - virtual void createSocket() throw (castor::exception::Exception) = 0; + virtual void createSocket() = 0; /** * Builds an address for the local machine on the given port */ struct sockaddr_in buildAddress(const unsigned short port) - throw (castor::exception::Exception); + ; /** * Builds an address for a remote machine on the given port */ struct sockaddr_in buildAddress(const unsigned short port, const std::string host) - throw (castor::exception::Exception); + ; /** * Builds an address for a remote machine on the given port */ struct sockaddr_in buildAddress(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception); + ; /** * Internal method to send the content of a buffer @@ -238,7 +238,7 @@ namespace castor { virtual void sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception) = 0; + = 0; /** * Internal method to read from a socket into a buffer. @@ -253,7 +253,7 @@ namespace castor { virtual void readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception) = 0; + = 0; protected: diff --git a/castor/io/AbstractTCPSocket.cpp b/castor/io/AbstractTCPSocket.cpp index 8bfd7066ad64f9467d4c1abb68bb206970a3d0d0..417bce8781653a012ac05e1c57e83a35c10004b5 100644 --- a/castor/io/AbstractTCPSocket.cpp +++ b/castor/io/AbstractTCPSocket.cpp @@ -49,7 +49,7 @@ //------------------------------------------------------------------------------ // constructor //------------------------------------------------------------------------------ -castor::io::AbstractTCPSocket::AbstractTCPSocket(int socket) throw () : +castor::io::AbstractTCPSocket::AbstractTCPSocket(int socket) throw() : AbstractSocket(socket), m_maxNetDataSize(-1) {} @@ -57,7 +57,7 @@ castor::io::AbstractTCPSocket::AbstractTCPSocket(int socket) throw () : // constructor //------------------------------------------------------------------------------ castor::io::AbstractTCPSocket::AbstractTCPSocket(const bool reusable) - throw (castor::exception::Exception) : + : AbstractSocket(reusable), m_maxNetDataSize(-1) {} @@ -66,7 +66,7 @@ castor::io::AbstractTCPSocket::AbstractTCPSocket(const bool reusable) //------------------------------------------------------------------------------ castor::io::AbstractTCPSocket::AbstractTCPSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception) : + : AbstractSocket(port, reusable), m_maxNetDataSize(-1) {} @@ -76,7 +76,7 @@ castor::io::AbstractTCPSocket::AbstractTCPSocket(const unsigned short port, castor::io::AbstractTCPSocket::AbstractTCPSocket(const unsigned short port, const std::string host, const bool reusable) - throw (castor::exception::Exception) : + : AbstractSocket(port, host, reusable), m_maxNetDataSize(-1) {} @@ -86,7 +86,7 @@ castor::io::AbstractTCPSocket::AbstractTCPSocket(const unsigned short port, castor::io::AbstractTCPSocket::AbstractTCPSocket(const unsigned short port, const unsigned long ip, const bool reusable) - throw (castor::exception::Exception) : + : AbstractSocket(port, ip, reusable), m_maxNetDataSize(-1) {} @@ -94,7 +94,7 @@ castor::io::AbstractTCPSocket::AbstractTCPSocket(const unsigned short port, // createSocket //------------------------------------------------------------------------------ void castor::io::AbstractTCPSocket::createSocket() - throw (castor::exception::Exception) { + { // creates the socket if ((m_socket = ::socket(AF_INET, SOCK_STREAM, 0)) < 0) { castor::exception::Exception ex(errno); @@ -115,7 +115,7 @@ void castor::io::AbstractTCPSocket::createSocket() void castor::io::AbstractTCPSocket::sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception) { + { // Sends the buffer with a header (magic number + size) if (netwrite_timeout(m_socket, (char*)(&magic), @@ -138,7 +138,7 @@ void castor::io::AbstractTCPSocket::sendBuffer(const unsigned int magic, void castor::io::AbstractTCPSocket::readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception) { + { // Determine the maximum amount of bytes per message that can be read from // the socket when readBuffer is called. By default this is 20MB if (m_maxNetDataSize == -1) { diff --git a/castor/io/AbstractTCPSocket.hpp b/castor/io/AbstractTCPSocket.hpp index 52dc0b0eb8bd0b7c7bd698c97db5e62d3212f585..ab09f6058cf8c74f8321777b553a28430056cb26 100644 --- a/castor/io/AbstractTCPSocket.hpp +++ b/castor/io/AbstractTCPSocket.hpp @@ -45,7 +45,7 @@ namespace castor { * Constructor building a Socket objet around a regular socket * @param socket the regular socket used */ - AbstractTCPSocket(int socket) throw (); + AbstractTCPSocket(int socket) throw(); /** * Constructor building a socket with no port. As a consequence, @@ -55,7 +55,7 @@ namespace castor { * @exception Exception in case of error */ AbstractTCPSocket(const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given local port @@ -66,7 +66,7 @@ namespace castor { */ AbstractTCPSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -79,7 +79,7 @@ namespace castor { AbstractTCPSocket(const unsigned short port, const std::string host, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -92,14 +92,14 @@ namespace castor { AbstractTCPSocket(const unsigned short port, const unsigned long ip, const bool reusable) - throw (castor::exception::Exception); + ; protected: /** * internal method to create the inner socket */ - virtual void createSocket() throw (castor::exception::Exception); + virtual void createSocket() ; /** * Internal method to send the content of a buffer @@ -113,7 +113,7 @@ namespace castor { virtual void sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception); + ; /** * Internal method to read from a socket into a buffer. @@ -128,7 +128,7 @@ namespace castor { virtual void readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception); + ; protected: diff --git a/castor/io/AuthClientSocket.cpp b/castor/io/AuthClientSocket.cpp index bb2a0d6c6ccd45d44405dfb06d085355a04c3130..dc12b07675d9a1c9231a8ec8fbd68c0eabd0b7be 100644 --- a/castor/io/AuthClientSocket.cpp +++ b/castor/io/AuthClientSocket.cpp @@ -47,7 +47,7 @@ // constructor //------------------------------------------------------------------------------ castor::io::AuthClientSocket::AuthClientSocket(int socket) - throw (castor::exception::Exception) : + : ClientSocket(socket) { if (loader() == -1) { @@ -69,7 +69,7 @@ castor::io::AuthClientSocket::AuthClientSocket(int socket) castor::io::AuthClientSocket::AuthClientSocket(const unsigned short port, const std::string host, int) - throw (castor::exception::Exception): ClientSocket(port, host) { + : ClientSocket(port, host) { if (loader() == -1) { castor::exception::Exception ex(serrno); @@ -90,7 +90,7 @@ castor::io::AuthClientSocket::AuthClientSocket(const unsigned short port, castor::io::AuthClientSocket::AuthClientSocket(const unsigned short port, const unsigned long ip, int) - throw (castor::exception::Exception) : ClientSocket(port, ip) { + : ClientSocket(port, ip) { if (loader() ==-1) { castor::exception::Exception ex(serrno); @@ -108,7 +108,7 @@ castor::io::AuthClientSocket::AuthClientSocket(const unsigned short port, //------------------------------------------------------------------------------ // destructor //------------------------------------------------------------------------------ -castor::io::AuthClientSocket::~AuthClientSocket() throw () { +castor::io::AuthClientSocket::~AuthClientSocket() throw() { // Csec_clearContext(&m_security_context); getClearContext(&m_security_context); @@ -121,7 +121,7 @@ castor::io::AuthClientSocket::~AuthClientSocket() throw () { // connect //------------------------------------------------------------------------------ void castor::io::AuthClientSocket::connect() - throw (castor::exception::Exception) { + { castor::io::ClientSocket::connect(); diff --git a/castor/io/AuthClientSocket.hpp b/castor/io/AuthClientSocket.hpp index 4dd9cfb92997998cad304360a798a6f3ae5dfdf4..e91b492522574f04c2dfcf152fdd4051ff3545f0 100644 --- a/castor/io/AuthClientSocket.hpp +++ b/castor/io/AuthClientSocket.hpp @@ -56,7 +56,7 @@ namespace castor { * Constructor building a Socket objet around a regular socket * @param socket the regular socket used */ - AuthClientSocket(int socket) throw (castor::exception::Exception); + AuthClientSocket(int socket) ; /** * Constructor building a socket on a given port of a given host @@ -68,7 +68,7 @@ namespace castor { AuthClientSocket(const unsigned short port, const std::string host, int service_type = CSEC_SERVICE_TYPE_HOST ) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -80,7 +80,7 @@ namespace castor { AuthClientSocket(const unsigned short port, const unsigned long ip, int service_type = CSEC_SERVICE_TYPE_HOST ) - throw (castor::exception::Exception); + ; /** * Destructor @@ -91,7 +91,7 @@ namespace castor { * Connects the socket to the given address */ virtual void connect() - throw (castor::exception::Exception); + ; protected: diff --git a/castor/io/AuthServerSocket.cpp b/castor/io/AuthServerSocket.cpp index 4cbb4cea6e3e93aa740d9a332ea7f97e46a42640..49bbbb286138debf76c4cccbc1f3a893afeba3a8 100644 --- a/castor/io/AuthServerSocket.cpp +++ b/castor/io/AuthServerSocket.cpp @@ -45,7 +45,7 @@ castor::io::AuthServerSocket::AuthServerSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception) : ServerSocket(port, reusable), + : ServerSocket(port, reusable), m_Euid(0), m_Egid(0) { memset(&m_security_context, 0, sizeof(m_security_context)); } @@ -60,7 +60,7 @@ castor::io::AuthServerSocket::AuthServerSocket(const unsigned short port, castor::io::AuthServerSocket::AuthServerSocket(castor::io::ServerSocket* cs, const Csec_context_t) - throw (castor::exception::Exception) : ServerSocket(cs->socket()), + : ServerSocket(cs->socket()), m_Euid(0), m_Egid(0) { memset(&m_security_context, 0, sizeof(m_security_context)); cs->resetSocket(); @@ -71,7 +71,7 @@ castor::io::AuthServerSocket::AuthServerSocket(castor::io::ServerSocket* cs, //------------------------------------------------------------------------------ // destructor //------------------------------------------------------------------------------ -castor::io::AuthServerSocket::~AuthServerSocket() throw () { +castor::io::AuthServerSocket::~AuthServerSocket() throw() { getClearContext(&m_security_context); } @@ -80,7 +80,7 @@ castor::io::AuthServerSocket::~AuthServerSocket() throw () { // accept //------------------------------------------------------------------------------ castor::io::ServerSocket* castor::io::AuthServerSocket::accept() - throw(castor::exception::Exception) { + { castor::io::ServerSocket* as = castor::io::ServerSocket::accept(); return new AuthServerSocket(as, m_security_context); @@ -91,7 +91,7 @@ castor::io::ServerSocket* castor::io::AuthServerSocket::accept() // setClientId (That method should go out of this class //------------------------------------------------------------------------------ void castor::io::AuthServerSocket::setClientId () - throw(castor::exception::Security) { + { char *mech, *name; char username[CA_MAXUSRNAMELEN+1]; @@ -114,7 +114,7 @@ void castor::io::AuthServerSocket::setClientId () // Init the security context and stablish the security context with the client //----------------------------------------------------------------------------- void castor::io::AuthServerSocket::initContext() - throw (castor::exception::Security) { + { if (loader() == -1) { castor::exception::Security ex(serrno); diff --git a/castor/io/AuthServerSocket.hpp b/castor/io/AuthServerSocket.hpp index 8592d4cf5bc98b1a67cd24868a1626f27cd26e13..19ce18e7b63ec672de1a63482f19209389a4f19a 100644 --- a/castor/io/AuthServerSocket.hpp +++ b/castor/io/AuthServerSocket.hpp @@ -61,14 +61,14 @@ namespace castor { * @param doListen whether to start listening on the socket. */ AuthServerSocket(const unsigned short port, - const bool reusable) throw (castor::exception::Exception); + const bool reusable) ; /** * */ AuthServerSocket(castor::io::ServerSocket* cs, const Csec_context_t context) - throw (castor::exception::Exception); + ; ~AuthServerSocket() throw(); @@ -78,14 +78,14 @@ namespace castor { * The deallocation of the new socket is the responsability * of the caller. */ - virtual ServerSocket* accept() throw(castor::exception::Exception); + virtual ServerSocket* accept() ; /** * This method gets the dn or principal of the client from the context and then * map to a local user. If the local user doen't exist it throws and exception * THAT METHOD SHOULDN'T BELONG TO THE CLASS SOCKET --TO BE MOVED */ - void setClientId () throw(castor::exception::Security); + void setClientId () ; /** * Returns the value uid in the local machine @@ -111,7 +111,7 @@ namespace castor { */ std::string getSecMech(); - void initContext() throw (castor::exception::Security); + void initContext() ; private: Csec_context_t m_security_context; uid_t m_Euid; diff --git a/castor/io/ClientSocket.cpp b/castor/io/ClientSocket.cpp index 511b0da7597b9c8dc3a1639d4f728c8a754b0578..fe02d4e6ab3b2a75df6fae14e4fa2e5adfc7fc57 100644 --- a/castor/io/ClientSocket.cpp +++ b/castor/io/ClientSocket.cpp @@ -48,7 +48,7 @@ //------------------------------------------------------------------------------ // constructor //------------------------------------------------------------------------------ -castor::io::ClientSocket::ClientSocket(int socket) throw () : +castor::io::ClientSocket::ClientSocket(int socket) throw() : AbstractTCPSocket(socket) {} //------------------------------------------------------------------------------ @@ -56,7 +56,7 @@ castor::io::ClientSocket::ClientSocket(int socket) throw () : //------------------------------------------------------------------------------ castor::io::ClientSocket::ClientSocket(const unsigned short port, const std::string host) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, host, false) { createSocket(); } @@ -66,7 +66,7 @@ castor::io::ClientSocket::ClientSocket(const unsigned short port, //------------------------------------------------------------------------------ castor::io::ClientSocket::ClientSocket(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, ip, false) { createSocket(); } @@ -75,7 +75,7 @@ castor::io::ClientSocket::ClientSocket(const unsigned short port, // connect //------------------------------------------------------------------------------ void castor::io::ClientSocket::connect() - throw (castor::exception::Exception) { + { // Connects the socket if (netconnect_timeout(m_socket, (struct sockaddr *)&m_saddr, sizeof(m_saddr), diff --git a/castor/io/ClientSocket.hpp b/castor/io/ClientSocket.hpp index 1eaa350333fef544347325aeb9b40e269602565b..0cff2e1137fa44dc4d01a4d3261b61b77c96896c 100644 --- a/castor/io/ClientSocket.hpp +++ b/castor/io/ClientSocket.hpp @@ -51,7 +51,7 @@ namespace castor { * Constructor building a Socket objet around a regular socket * @param socket the regular socket used */ - ClientSocket(int socket) throw (); + ClientSocket(int socket) throw(); /** * Constructor building a socket on a given port of a given host @@ -61,7 +61,7 @@ namespace castor { */ ClientSocket(const unsigned short port, const std::string host) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -71,13 +71,13 @@ namespace castor { */ ClientSocket(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception); + ; /** * Connects the socket to the given address */ virtual void connect() - throw (castor::exception::Exception); + ; }; diff --git a/castor/io/DummyPollEventHandler.cpp b/castor/io/DummyPollEventHandler.cpp index 6c3877a7d16e0e8f862c669afc9857475fcf9e22..21f7f63cb015e45568238809cfe46c667b05e5c9 100644 --- a/castor/io/DummyPollEventHandler.cpp +++ b/castor/io/DummyPollEventHandler.cpp @@ -55,6 +55,6 @@ void castor::io::DummyPollEventHandler::fillPollFd(struct pollfd &fd) throw() { // handleEvent //------------------------------------------------------------------------------ bool castor::io::DummyPollEventHandler::handleEvent(const struct pollfd &fd) - throw(castor::exception::Exception) { + { return m_returnVal; } diff --git a/castor/io/DummyPollEventHandler.hpp b/castor/io/DummyPollEventHandler.hpp index 45b6cfdb1b402044f1b4a6f48400555343653e20..ca6c30423d0cb62bc931c6aaa5e2679404a5b1e9 100644 --- a/castor/io/DummyPollEventHandler.hpp +++ b/castor/io/DummyPollEventHandler.hpp @@ -58,7 +58,7 @@ public: * @return true if the event handler should be removed from and deleted by * the reactor. */ - bool handleEvent(const struct pollfd &fd) throw(castor::exception::Exception); + bool handleEvent(const struct pollfd &fd) ; /** * Destructor. diff --git a/castor/io/DummyPollReactor.cpp b/castor/io/DummyPollReactor.cpp index 795d71841e50d12028f1e8225a8e88142a6f8255..f304a9e26beca63222677b3cf1ca9a9a90097633 100644 --- a/castor/io/DummyPollReactor.cpp +++ b/castor/io/DummyPollReactor.cpp @@ -39,19 +39,19 @@ void castor::io::DummyPollReactor::clear() throw() { // registerHandler //------------------------------------------------------------------------------ void castor::io::DummyPollReactor::registerHandler( - PollEventHandler *const handler) throw(castor::exception::Exception) { + PollEventHandler *const handler) { } //------------------------------------------------------------------------------ // removeHandler //------------------------------------------------------------------------------ void castor::io::DummyPollReactor::removeHandler( - PollEventHandler *const handler) throw(castor::exception::Exception) { + PollEventHandler *const handler) { } //------------------------------------------------------------------------------ // handleEvents //------------------------------------------------------------------------------ void castor::io::DummyPollReactor::handleEvents(const int timeout) - throw(castor::exception::Exception) { + { } diff --git a/castor/io/DummyPollReactor.hpp b/castor/io/DummyPollReactor.hpp index e2890320e3955a75164e481af14760b5dc4cc0e5..4539b1dffe3c6fafc5512ae89ba3cf93ebc0de72 100644 --- a/castor/io/DummyPollReactor.hpp +++ b/castor/io/DummyPollReactor.hpp @@ -53,7 +53,7 @@ public: * @param handler The handler to be registered. */ void registerHandler(PollEventHandler *const handler) - throw(castor::exception::Exception); + ; /** * Removes the specified handler from the reactor. This method effectively @@ -62,14 +62,14 @@ public: * @param handler The handler to be removed. */ void removeHandler(PollEventHandler *const handler) - throw(castor::exception::Exception); + ; /** * Handles any pending events. * * @param timeout Timeout in milliseconds. */ - void handleEvents(const int timeout) throw(castor::exception::Exception); + void handleEvents(const int timeout) ; }; // class DummyPollReactor diff --git a/castor/io/IStreamConverter.hpp b/castor/io/IStreamConverter.hpp index cb6b6956e1b4d732cf07d51ba59227ad049aca94..e5cac721aa0a6dba9791c687fcda8e699c4ee836 100644 --- a/castor/io/IStreamConverter.hpp +++ b/castor/io/IStreamConverter.hpp @@ -66,7 +66,7 @@ namespace castor { virtual void marshalObject(castor::IObject* obj, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) = 0; + = 0; /** * Unmarshals an object from a StreamAddress @@ -80,7 +80,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) = 0; + = 0; }; diff --git a/castor/io/IoTest.cpp b/castor/io/IoTest.cpp index e2bc7d9a6af24d7cdd08eeb6d462705938da5d16..1e05b424103b2b92dafdc00185879f6989dc0355 100644 --- a/castor/io/IoTest.cpp +++ b/castor/io/IoTest.cpp @@ -52,7 +52,7 @@ protected: } int createLocalListenSocket(const char *const listenSockPath) - throw (castor::exception::Exception) { + { // Delete the file to be used for the socket if the file already exists unlink(listenSockPath); diff --git a/castor/io/PipeSocket.cpp b/castor/io/PipeSocket.cpp index ee612ec8b037aeef860d2304bd5b01515ef7b57b..05e62d55f4b3152fecb0882ed5e88c06a3fd7a79 100644 --- a/castor/io/PipeSocket.cpp +++ b/castor/io/PipeSocket.cpp @@ -38,7 +38,7 @@ // constructor //------------------------------------------------------------------------------ castor::io::PipeSocket::PipeSocket() - throw (castor::exception::Exception) : + : AbstractSocket(0, false), m_mode(castor::io::PIPE_RW) { int fds[2]; @@ -57,7 +57,7 @@ castor::io::PipeSocket::PipeSocket() // constructor //------------------------------------------------------------------------------ castor::io::PipeSocket::PipeSocket(const int fdIn, const int fdOut, const int mode) - throw (castor::exception::Exception) : + : AbstractSocket(0, false), m_fdIn(fdIn), m_fdOut(fdOut), m_mode(mode) {} //------------------------------------------------------------------------------ @@ -98,7 +98,7 @@ void castor::io::PipeSocket::closeRead() void castor::io::PipeSocket::sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception) { + { if ((m_mode & castor::io::PIPE_WRITE) == 0) { castor::exception::Exception ex(0); ex.getMessage() << "Pipe closed for writing"; @@ -124,7 +124,7 @@ void castor::io::PipeSocket::sendBuffer(const unsigned int magic, void castor::io::PipeSocket::readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception) { + { if ((m_mode & castor::io::PIPE_READ) == 0) { castor::exception::Exception ex(0); ex.getMessage() << "Pipe closed for reading"; diff --git a/castor/io/PipeSocket.hpp b/castor/io/PipeSocket.hpp index aca34b58f7ad16d1481adfa3668f6e53b3cb2ada..8c812464d37d2b0ac3399b1644a2da63a449759f 100644 --- a/castor/io/PipeSocket.hpp +++ b/castor/io/PipeSocket.hpp @@ -55,7 +55,7 @@ namespace castor { * @throw exception if the pipe cannot be created */ PipeSocket() - throw (castor::exception::Exception); + ; /** * Constructor building a socket on the given file descriptors. @@ -65,7 +65,7 @@ namespace castor { * @param mode one of PIPE_READ, PIPE_WRITE, PIPE_RW */ PipeSocket(const int fdIn, const int fdOut, const int mode) - throw (castor::exception::Exception); + ; /** * Default destructor. Closes the pipe. @@ -98,7 +98,7 @@ namespace castor { * Internal method to create the inner socket * not needed for this implementation */ - virtual void createSocket() throw (castor::exception::Exception) {}; + virtual void createSocket() {}; /** * Internal method to send the content of a buffer @@ -111,7 +111,7 @@ namespace castor { virtual void sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception); + ; /** * Internal method to read from a socket into a buffer. @@ -125,7 +125,7 @@ namespace castor { virtual void readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception); + ; private: diff --git a/castor/io/PollEventHandler.hpp b/castor/io/PollEventHandler.hpp index 6c594291766b8003d56530b222df34e59886ad29..8cc8e5f302999da7b0b0cb2bf2134d8c7c39c9bf 100644 --- a/castor/io/PollEventHandler.hpp +++ b/castor/io/PollEventHandler.hpp @@ -63,7 +63,7 @@ public: * the reactor. */ virtual bool handleEvent(const struct pollfd &fd) - throw(castor::exception::Exception) = 0; + = 0; /** * Destructor. diff --git a/castor/io/PollReactor.hpp b/castor/io/PollReactor.hpp index 21aa13895fedc072803785efa428189125f873c3..5139a4440ce25f4296daa7d2fa0613a9952be9d4 100644 --- a/castor/io/PollReactor.hpp +++ b/castor/io/PollReactor.hpp @@ -63,7 +63,7 @@ public: * and therefore delete it as needed. */ virtual void registerHandler(PollEventHandler *const handler) - throw(castor::exception::Exception) = 0; + = 0; /** * Handles any pending events. @@ -71,7 +71,7 @@ public: * @param timeout Timeout in milliseconds. */ virtual void handleEvents(const int timeout) - throw(castor::exception::Exception) = 0; + = 0; }; // class PollReactor diff --git a/castor/io/PollReactorImpl.cpp b/castor/io/PollReactorImpl.cpp index 68a1a4528605105e6f53e0edcacc9b5edbe55450..ca4246d1f7a0aaa7eeb99506644a1c948461ca32 100644 --- a/castor/io/PollReactorImpl.cpp +++ b/castor/io/PollReactorImpl.cpp @@ -58,7 +58,7 @@ void castor::io::PollReactorImpl::clear() throw() { // registerHandler //------------------------------------------------------------------------------ void castor::io::PollReactorImpl::registerHandler( - PollEventHandler *const handler) throw(castor::exception::Exception) { + PollEventHandler *const handler) { std::pair<HandlerMap::iterator, bool> insertResult = m_handlers.insert(HandlerMap::value_type(handler->getFd(), handler)); if(!insertResult.second) { @@ -74,7 +74,7 @@ void castor::io::PollReactorImpl::registerHandler( // removeHandler //------------------------------------------------------------------------------ void castor::io::PollReactorImpl::removeHandler( - PollEventHandler *const handler) throw(castor::exception::Exception) { + PollEventHandler *const handler) { const HandlerMap::size_type nbElements = m_handlers.erase(handler->getFd()); if(0 == nbElements) { castor::exception::Exception ex; @@ -88,7 +88,7 @@ void castor::io::PollReactorImpl::removeHandler( // handleEvents //------------------------------------------------------------------------------ void castor::io::PollReactorImpl::handleEvents(const int timeout) - throw(castor::exception::Exception) { + { nfds_t nfds = 0; castor::utils::SmartArrayPtr<struct pollfd> fds(buildPollFds(nfds)); @@ -117,7 +117,7 @@ void castor::io::PollReactorImpl::handleEvents(const int timeout) // buildPollFdsArray //------------------------------------------------------------------------------ struct pollfd *castor::io::PollReactorImpl::buildPollFds(nfds_t &nfds) - throw(castor::exception::Exception) { + { nfds = m_handlers.size(); castor::utils::SmartArrayPtr<struct pollfd> fds; @@ -145,7 +145,7 @@ struct pollfd *castor::io::PollReactorImpl::buildPollFds(nfds_t &nfds) //------------------------------------------------------------------------------ void castor::io::PollReactorImpl::dispatchEventHandlers( const struct pollfd *const fds, const nfds_t nfds) - throw(castor::exception::Exception) { + { // For each poll() file descriptor for(nfds_t i=0; i<nfds; i++) { // Find and dispatch the appropriate handler if there is a pending event @@ -164,7 +164,7 @@ void castor::io::PollReactorImpl::dispatchEventHandlers( // findHandler //------------------------------------------------------------------------------ castor::io::PollEventHandler *castor::io::PollReactorImpl::findHandler( - const int fd) throw(castor::exception::Exception) { + const int fd) { HandlerMap::iterator itor = m_handlers.find(fd); if(itor == m_handlers.end()) { castor::exception::Exception ex; diff --git a/castor/io/PollReactorImpl.hpp b/castor/io/PollReactorImpl.hpp index ec35663bc1549a7ad411b1ab04c457810e057a20..4a2ef6ca30384cd221a9e26511283ef478e57579 100644 --- a/castor/io/PollReactorImpl.hpp +++ b/castor/io/PollReactorImpl.hpp @@ -72,14 +72,14 @@ public: * and therefore delete it as needed. */ void registerHandler(PollEventHandler *const handler) - throw(castor::exception::Exception); + ; /** * Handles any pending events. * * @param timeout Timeout in milliseconds. */ - void handleEvents(const int timeout) throw(castor::exception::Exception); + void handleEvents(const int timeout) ; private: @@ -105,21 +105,21 @@ private: * @return The array of file descriptors. Please note that is the * responsibility of the caller to delete the array. */ - struct pollfd *buildPollFds(nfds_t &nfds) throw(castor::exception::Exception); + struct pollfd *buildPollFds(nfds_t &nfds) ; /** * Dispatches the appropriate event handlers based on the specified result * from poll(). */ void dispatchEventHandlers(const struct pollfd *const fds, const nfds_t nfds) - throw(castor::exception::Exception); + ; /** * Returns the event handler associated with the specified integer * file-descriptor. */ PollEventHandler *findHandler(const int fd) - throw(castor::exception::Exception); + ; /** * Removes the specified handler from the reactor. This method effectively @@ -128,7 +128,7 @@ private: * @param handler The handler to be removed. */ void removeHandler(PollEventHandler *const handler) - throw(castor::exception::Exception); + ; }; // class PollReactorImpl diff --git a/castor/io/ServerSocket.cpp b/castor/io/ServerSocket.cpp index 3bcade2e2489699ab7dec91267e17dac1c68cb47..d66dac095c0b1409d65af7a2a2c439f633ca386c 100644 --- a/castor/io/ServerSocket.cpp +++ b/castor/io/ServerSocket.cpp @@ -56,7 +56,7 @@ //------------------------------------------------------------------------------ // constructor //------------------------------------------------------------------------------ -castor::io::ServerSocket::ServerSocket(int socket) throw () : +castor::io::ServerSocket::ServerSocket(int socket) throw() : AbstractTCPSocket(socket), m_listening(false) { srand(time(NULL)); @@ -67,7 +67,7 @@ castor::io::ServerSocket::ServerSocket(int socket) throw () : // constructor //------------------------------------------------------------------------------ castor::io::ServerSocket::ServerSocket(const bool reusable) - throw (castor::exception::Exception) : + : AbstractTCPSocket(reusable), m_listening(false) { srand(time(NULL)); @@ -81,7 +81,7 @@ castor::io::ServerSocket::ServerSocket(const bool reusable) //------------------------------------------------------------------------------ castor::io::ServerSocket::ServerSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, reusable), m_listening(false) { srand(time(NULL)); @@ -97,7 +97,7 @@ castor::io::ServerSocket::ServerSocket(const unsigned short port, castor::io::ServerSocket::ServerSocket(const unsigned short port, const std::string host, const bool reusable) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, host, reusable), m_listening(false) { srand(time(NULL)); @@ -113,7 +113,7 @@ castor::io::ServerSocket::ServerSocket(const unsigned short port, castor::io::ServerSocket::ServerSocket(const unsigned short port, const unsigned long ip, const bool reusable) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, ip, reusable), m_listening(false) { m_lowPort = m_highPort = -1; @@ -127,7 +127,7 @@ castor::io::ServerSocket::ServerSocket(const unsigned short port, // listen //------------------------------------------------------------------------------ void castor::io::ServerSocket::listen() - throw(castor::exception::Exception) { + { // watch out sometimes for high-stress tests the listen may not return // error code EADDRINUSE @@ -157,7 +157,7 @@ void castor::io::ServerSocket::listen() // accept //------------------------------------------------------------------------------ castor::io::ServerSocket* castor::io::ServerSocket::accept() - throw(castor::exception::Exception) { + { // Check if listen was called, if not, call it if (!m_listening) { listen(); @@ -187,7 +187,7 @@ castor::io::ServerSocket* castor::io::ServerSocket::accept() // bind //------------------------------------------------------------------------------ void castor::io::ServerSocket::bind(int lowPort, int highPort) - throw (castor::exception::Exception) { + { // check range validity if (lowPort < 1024 || highPort > 65535 || lowPort > highPort) { castor::exception::Exception ex(errno); @@ -205,7 +205,7 @@ void castor::io::ServerSocket::bind(int lowPort, int highPort) // bind //------------------------------------------------------------------------------ void castor::io::ServerSocket::bind() - throw (castor::exception::Exception) { + { int rc = -1; int port; diff --git a/castor/io/ServerSocket.hpp b/castor/io/ServerSocket.hpp index dab5bbae6f3aa7e9749c7713162762e5a9f86e50..08cbe3326d36392c7983c7a18143905d6539a52a 100644 --- a/castor/io/ServerSocket.hpp +++ b/castor/io/ServerSocket.hpp @@ -53,7 +53,7 @@ namespace castor { * Constructor building a Socket objet around a regular socket * @param socket the regular socket used */ - ServerSocket(int socket) throw (); + ServerSocket(int socket) throw(); /** * Constructor building a socket with no port. As a consequence, @@ -61,7 +61,7 @@ namespace castor { * The bind method should be call independently * @param reusable whether the socket should be reusable */ - ServerSocket(const bool reusable) throw (castor::exception::Exception); + ServerSocket(const bool reusable) ; /** * Constructor building a socket on a given local port @@ -71,7 +71,7 @@ namespace castor { */ ServerSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -83,7 +83,7 @@ namespace castor { ServerSocket(const unsigned short port, const std::string host, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -95,7 +95,7 @@ namespace castor { ServerSocket(const unsigned short port, const unsigned long ip, const bool reusable) - throw (castor::exception::Exception); + ; /** * Start listening on the socket. @@ -103,14 +103,14 @@ namespace castor { * happen because bind() is not process/thread-safe), a new bind() * is performed, so to make this class process-safe. */ - virtual void listen() throw(castor::exception::Exception); + virtual void listen() ; /** * accept a connection and return the correponding Socket. * The deallocation of the new socket is the responsability * of the caller. */ - virtual ServerSocket* accept() throw(castor::exception::Exception); + virtual ServerSocket* accept() ; /** * binds the socket and let the system choose a port @@ -120,7 +120,7 @@ namespace castor { * @param highPort the high value in the port range (included) */ void bind(int lowPort, int highPort) - throw (castor::exception::Exception); + ; private: @@ -140,7 +140,7 @@ namespace castor { * by a previous call to bind(lowPort, highPort) */ void bind() - throw (castor::exception::Exception); + ; }; diff --git a/castor/io/StreamAbortResponseCnv.cpp b/castor/io/StreamAbortResponseCnv.cpp index 3467406d9720a152ed66230399aef3629fdc9361..6dad5b1b8d67eb00da9193d801739421a0eb2e13 100644 --- a/castor/io/StreamAbortResponseCnv.cpp +++ b/castor/io/StreamAbortResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamAbortResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::AbortResponse* obj = dynamic_cast<castor::rh::AbortResponse*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamAbortResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamAbortResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -125,7 +125,7 @@ castor::IObject* castor::io::StreamAbortResponseCnv::createObj(castor::IAddress* void castor::io::StreamAbortResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::AbortResponse* obj = dynamic_cast<castor::rh::AbortResponse*>(object); if (0 == obj) { @@ -147,7 +147,7 @@ void castor::io::StreamAbortResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamAbortResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamAbortResponseCnv.hpp b/castor/io/StreamAbortResponseCnv.hpp index 109b4ab48844916a5becec1de66ba8fdbdbf9a13..1c2e99eb73e782a29bd486e825a88e280cf91ef6 100644 --- a/castor/io/StreamAbortResponseCnv.hpp +++ b/castor/io/StreamAbortResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamAbortResponseCnv diff --git a/castor/io/StreamBWUserCnv.cpp b/castor/io/StreamBWUserCnv.cpp index 4ebecc1bcf14faab794c90d65a59d0c4b9d5199c..f332db933652d40ef9e2b47448a7b8a08452d38a 100644 --- a/castor/io/StreamBWUserCnv.cpp +++ b/castor/io/StreamBWUserCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamBWUserCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamBWUserCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamBWUserCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamBWUserCnv::createObj(castor::IAddress* addres void castor::io::StreamBWUserCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::bwlist::BWUser* obj = dynamic_cast<castor::bwlist::BWUser*>(object); if (0 == obj) { @@ -139,7 +139,7 @@ void castor::io::StreamBWUserCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamBWUserCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamBWUserCnv.hpp b/castor/io/StreamBWUserCnv.hpp index bfe10da66217456dd397f89247eba0813d333f97..3ede93d612491624bebb2c832be9b5c6de89f7c3 100644 --- a/castor/io/StreamBWUserCnv.hpp +++ b/castor/io/StreamBWUserCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamBWUserCnv diff --git a/castor/io/StreamBaseAddressCnv.cpp b/castor/io/StreamBaseAddressCnv.cpp index f00c0bbac75c9f8b61b11e074697bae43ce85c68..92c3a62c590184836fccaa24990ca4aa10b9e7cb 100644 --- a/castor/io/StreamBaseAddressCnv.cpp +++ b/castor/io/StreamBaseAddressCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamBaseAddressCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamBaseAddressCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamBaseAddressCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -125,7 +125,7 @@ castor::IObject* castor::io::StreamBaseAddressCnv::createObj(castor::IAddress* a void castor::io::StreamBaseAddressCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::BaseAddress* obj = dynamic_cast<castor::BaseAddress*>(object); if (0 == obj) { @@ -147,7 +147,7 @@ void castor::io::StreamBaseAddressCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamBaseAddressCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamBaseAddressCnv.hpp b/castor/io/StreamBaseAddressCnv.hpp index fea72946b1e9d92c562f550af1a73876330d7b62..28ebdb56abf78ea16f9ecfcdd6c40988da279b52 100644 --- a/castor/io/StreamBaseAddressCnv.hpp +++ b/castor/io/StreamBaseAddressCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamBaseAddressCnv diff --git a/castor/io/StreamBaseCnv.cpp b/castor/io/StreamBaseCnv.cpp index c7d4812c599c76c3ab5832b5d0e88ae7d72a0b9f..92adf62bf4b94f80bc68ff7537da0b37649c76f4 100644 --- a/castor/io/StreamBaseCnv.cpp +++ b/castor/io/StreamBaseCnv.cpp @@ -73,7 +73,7 @@ void castor::io::StreamBaseCnv::bulkCreateRep(castor::IAddress*, std::vector<castor::IObject*> &, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "Bulk operations are not supported for streaming." << std::endl; @@ -86,7 +86,7 @@ void castor::io::StreamBaseCnv::bulkCreateRep(castor::IAddress*, void castor::io::StreamBaseCnv::updateRep(castor::IAddress*, castor::IObject*, bool) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "Cannot update representation in case of streaming." << std::endl; @@ -99,7 +99,7 @@ void castor::io::StreamBaseCnv::updateRep(castor::IAddress*, void castor::io::StreamBaseCnv::deleteRep(castor::IAddress*, castor::IObject*, bool) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "Cannot delete representation in case of streaming." << std::endl; @@ -111,7 +111,7 @@ void castor::io::StreamBaseCnv::deleteRep(castor::IAddress*, //------------------------------------------------------------------------------ std::vector<castor::IObject*> castor::io::StreamBaseCnv::bulkCreateObj(castor::IAddress*) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "Bulk operations are not supported for streaming." << std::endl; @@ -122,7 +122,7 @@ castor::io::StreamBaseCnv::bulkCreateObj(castor::IAddress*) // updateObj //------------------------------------------------------------------------------ void castor::io::StreamBaseCnv::updateObj(castor::IObject*) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "Cannot update object in case of streaming." << std::endl; @@ -136,7 +136,7 @@ void castor::io::StreamBaseCnv::fillRep(castor::IAddress*, castor::IObject*, unsigned int, bool) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "fillRep should never be called in case of streaming." << std::endl; @@ -150,7 +150,7 @@ void castor::io::StreamBaseCnv::fillObj(castor::IAddress*, castor::IObject*, unsigned int, bool) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "fillObj should never be called in case of streaming." << std::endl; diff --git a/castor/io/StreamBaseCnv.hpp b/castor/io/StreamBaseCnv.hpp index 9687924ff8b4d9f6d94f476d7e33ecba73012637..b4de6d5cc8ef906760a024ab02354408601d8348 100644 --- a/castor/io/StreamBaseCnv.hpp +++ b/castor/io/StreamBaseCnv.hpp @@ -91,7 +91,7 @@ namespace castor { std::vector<castor::IObject*> &objects, bool endTransaction, unsigned int type) - throw (castor::exception::Exception); + ; /** * Updates foreign representation from a C++ Object. @@ -100,7 +100,7 @@ namespace castor { virtual void updateRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * Deletes foreign representation of a C++ Object. @@ -109,7 +109,7 @@ namespace castor { virtual void deleteRep(castor::IAddress* address, castor::IObject* object, bool endTransaction) - throw (castor::exception::Exception); + ; /** * create C++ objects from foreign representations @@ -121,14 +121,14 @@ namespace castor { * @exception Exception throws an Exception in case of error */ std::vector<IObject*> bulkCreateObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Updates C++ object from its foreign representation. * This streaming implementation always throws an exception. */ virtual void updateObj(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Fill the foreign representation with some of the objects @@ -139,7 +139,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception); + ; /** * Retrieve from the foreign representation some of the @@ -150,7 +150,7 @@ namespace castor { castor::IObject* object, unsigned int type, bool endTransaction = false) - throw (castor::exception::Exception); + ; protected: diff --git a/castor/io/StreamBasicResponseCnv.cpp b/castor/io/StreamBasicResponseCnv.cpp index 74770d9f61706e7944dd09d10b0e10a3289c5046..8ae651ff4e31eb8e3edb918a4dd3129915ebcc45 100644 --- a/castor/io/StreamBasicResponseCnv.cpp +++ b/castor/io/StreamBasicResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamBasicResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::BasicResponse* obj = dynamic_cast<castor::rh::BasicResponse*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamBasicResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamBasicResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -121,7 +121,7 @@ castor::IObject* castor::io::StreamBasicResponseCnv::createObj(castor::IAddress* void castor::io::StreamBasicResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::BasicResponse* obj = dynamic_cast<castor::rh::BasicResponse*>(object); if (0 == obj) { @@ -143,7 +143,7 @@ void castor::io::StreamBasicResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamBasicResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamBasicResponseCnv.hpp b/castor/io/StreamBasicResponseCnv.hpp index c3b714d3b4b3b30ef684ae3f943fce3502012eef..8649190b20a1175fa84eb5169bcb190f4f422571 100644 --- a/castor/io/StreamBasicResponseCnv.hpp +++ b/castor/io/StreamBasicResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamBasicResponseCnv diff --git a/castor/io/StreamChangePrivilegeCnv.cpp b/castor/io/StreamChangePrivilegeCnv.cpp index 6ac99e49873b53a3a681fee3d6eed33f0a3a58dc..cee105b64b7c7ecf2f93217207957bbaa347da1e 100644 --- a/castor/io/StreamChangePrivilegeCnv.cpp +++ b/castor/io/StreamChangePrivilegeCnv.cpp @@ -84,7 +84,7 @@ void castor::io::StreamChangePrivilegeCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); StreamAddress* ad = @@ -110,7 +110,7 @@ void castor::io::StreamChangePrivilegeCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamChangePrivilegeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -168,7 +168,7 @@ castor::IObject* castor::io::StreamChangePrivilegeCnv::createObj(castor::IAddres void castor::io::StreamChangePrivilegeCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::bwlist::ChangePrivilege* obj = dynamic_cast<castor::bwlist::ChangePrivilege*>(object); if (0 == obj) { @@ -204,7 +204,7 @@ void castor::io::StreamChangePrivilegeCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamChangePrivilegeCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamChangePrivilegeCnv.hpp b/castor/io/StreamChangePrivilegeCnv.hpp index 9ba9cce6e956a968a9cf87dbaae189c76a1a1d4d..c17bbbfa2e29ba221e41904abc764678061b72e3 100644 --- a/castor/io/StreamChangePrivilegeCnv.hpp +++ b/castor/io/StreamChangePrivilegeCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamChangePrivilegeCnv diff --git a/castor/io/StreamClientCnv.cpp b/castor/io/StreamClientCnv.cpp index 4e64fad8703dc8bd00419ee0954e108ba8b55c2b..1f9f550076cf4f799c0a7480b16a409cc45f44fd 100644 --- a/castor/io/StreamClientCnv.cpp +++ b/castor/io/StreamClientCnv.cpp @@ -76,7 +76,7 @@ void castor::io::StreamClientCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamClientCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamClientCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -119,7 +119,7 @@ castor::IObject* castor::io::StreamClientCnv::createObj(castor::IAddress* addres void castor::io::StreamClientCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::Client* obj = dynamic_cast<castor::rh::Client*>(object); if (0 == obj) { @@ -141,7 +141,7 @@ void castor::io::StreamClientCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamClientCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamClientCnv.hpp b/castor/io/StreamClientCnv.hpp index d67ae56239912f029b60aaf82cb102d1f8602fbd..eeb2e1033c800dbf03c8dfcefc3b7491e12d1cec 100644 --- a/castor/io/StreamClientCnv.hpp +++ b/castor/io/StreamClientCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamClientCnv diff --git a/castor/io/StreamClientIdentificationCnv.cpp b/castor/io/StreamClientIdentificationCnv.cpp index 16e36433483d340ee9fc2838015dc355f2448ee0..95fdca94788518998e171818718540b509c501cd 100644 --- a/castor/io/StreamClientIdentificationCnv.cpp +++ b/castor/io/StreamClientIdentificationCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamClientIdentificationCnv::createRep(castor::IAddress* addr castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); StreamAddress* ad = @@ -97,7 +97,7 @@ void castor::io::StreamClientIdentificationCnv::createRep(castor::IAddress* addr // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamClientIdentificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -133,7 +133,7 @@ castor::IObject* castor::io::StreamClientIdentificationCnv::createObj(castor::IA void castor::io::StreamClientIdentificationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::ClientIdentification* obj = dynamic_cast<castor::vdqm::ClientIdentification*>(object); if (0 == obj) { @@ -155,7 +155,7 @@ void castor::io::StreamClientIdentificationCnv::marshalObject(castor::IObject* o //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamClientIdentificationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamClientIdentificationCnv.hpp b/castor/io/StreamClientIdentificationCnv.hpp index a236ff57b3fa8310ffb66ac09fadb41475663cf8..fec23f0eeb79d35c48cb5640a617a74343d49689 100644 --- a/castor/io/StreamClientIdentificationCnv.hpp +++ b/castor/io/StreamClientIdentificationCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamClientIdentificationCnv diff --git a/castor/io/StreamCnvSvc.cpp b/castor/io/StreamCnvSvc.cpp index 49d11f0c1359e9e32181ddf63560dc27b5514da2..c6e2584319ab14ab9e4ceb6e98984793fe76e6f8 100644 --- a/castor/io/StreamCnvSvc.cpp +++ b/castor/io/StreamCnvSvc.cpp @@ -87,7 +87,7 @@ void castor::io::StreamCnvSvc::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::io::StreamAddress* ad = dynamic_cast <castor::io::StreamAddress*>(address); ObjectSet alreadyDone; @@ -99,7 +99,7 @@ void castor::io::StreamCnvSvc::createRep(castor::IAddress* address, // ----------------------------------------------------------------------- castor::IObject* castor::io::StreamCnvSvc::createObj (castor::IAddress* address) - throw (castor::exception::Exception) { + { castor::io::StreamAddress* ad = dynamic_cast<castor::io::StreamAddress*>(address); ObjectCatalog newlyCreated; @@ -112,7 +112,7 @@ castor::IObject* castor::io::StreamCnvSvc::createObj void castor::io::StreamCnvSvc::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { // Look for an adapted converter IConverter* conv; if (0 != object) { @@ -134,7 +134,7 @@ void castor::io::StreamCnvSvc::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamCnvSvc::unmarshalObject(castor::io::StreamAddress& address, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { // If the address has no type, find it out if (OBJ_INVALID == address.objType()) { int objType; diff --git a/castor/io/StreamCnvSvc.hpp b/castor/io/StreamCnvSvc.hpp index ed160709ba9ccd75a693311542cc6445ad67a88b..959b756287b9e7bca9254d3229a9d59074ab6fcb 100644 --- a/castor/io/StreamCnvSvc.hpp +++ b/castor/io/StreamCnvSvc.hpp @@ -87,7 +87,7 @@ namespace castor { IObject* object, bool endTransaction, unsigned int type = OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * create C++ object from foreign representation. @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ IObject* createObj (IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(StreamAddress& address, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; diff --git a/castor/io/StreamDeviceGroupNameCnv.cpp b/castor/io/StreamDeviceGroupNameCnv.cpp index 85888c384283a3eedb653568d6452c8a4a742aa7..b379c134c281dc4b3a05b08cd8d595880d676880 100644 --- a/castor/io/StreamDeviceGroupNameCnv.cpp +++ b/castor/io/StreamDeviceGroupNameCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamDeviceGroupNameCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); StreamAddress* ad = @@ -93,7 +93,7 @@ void castor::io::StreamDeviceGroupNameCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDeviceGroupNameCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -117,7 +117,7 @@ castor::IObject* castor::io::StreamDeviceGroupNameCnv::createObj(castor::IAddres void castor::io::StreamDeviceGroupNameCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName* obj = dynamic_cast<castor::vdqm::DeviceGroupName*>(object); if (0 == obj) { @@ -139,7 +139,7 @@ void castor::io::StreamDeviceGroupNameCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDeviceGroupNameCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDeviceGroupNameCnv.hpp b/castor/io/StreamDeviceGroupNameCnv.hpp index 500aa33b1fd73ad4e4c55679504b594f18a272dc..a9f67378e19fc458007534516328628192bd3d8f 100644 --- a/castor/io/StreamDeviceGroupNameCnv.hpp +++ b/castor/io/StreamDeviceGroupNameCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDeviceGroupNameCnv diff --git a/castor/io/StreamDiskCopyForRecallCnv.cpp b/castor/io/StreamDiskCopyForRecallCnv.cpp index d4d4030418effcb532f58d0f7cb2061e25f990fc..d432d389ec8869c95b4359abe9bb2b46b214b638 100644 --- a/castor/io/StreamDiskCopyForRecallCnv.cpp +++ b/castor/io/StreamDiskCopyForRecallCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamDiskCopyForRecallCnv::createRep(castor::IAddress* address castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::DiskCopyForRecall* obj = dynamic_cast<castor::stager::DiskCopyForRecall*>(object); StreamAddress* ad = @@ -96,7 +96,7 @@ void castor::io::StreamDiskCopyForRecallCnv::createRep(castor::IAddress* address // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskCopyForRecallCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -126,7 +126,7 @@ castor::IObject* castor::io::StreamDiskCopyForRecallCnv::createObj(castor::IAddr void castor::io::StreamDiskCopyForRecallCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::DiskCopyForRecall* obj = dynamic_cast<castor::stager::DiskCopyForRecall*>(object); if (0 == obj) { @@ -148,7 +148,7 @@ void castor::io::StreamDiskCopyForRecallCnv::marshalObject(castor::IObject* obje //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskCopyForRecallCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDiskCopyForRecallCnv.hpp b/castor/io/StreamDiskCopyForRecallCnv.hpp index 17024fc29ac44aeac5a447bb20fefa76f014cb45..84d6a53c5e6edd931981342f96f7c25bd6e7a426 100644 --- a/castor/io/StreamDiskCopyForRecallCnv.hpp +++ b/castor/io/StreamDiskCopyForRecallCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDiskCopyForRecallCnv diff --git a/castor/io/StreamDiskCopyInfoCnv.cpp b/castor/io/StreamDiskCopyInfoCnv.cpp index 36ab339030124e3faaa1c4f8f612278509fff32c..c9f8e9fdde9627d355fcdf530dadf85832ebb8ed 100644 --- a/castor/io/StreamDiskCopyInfoCnv.cpp +++ b/castor/io/StreamDiskCopyInfoCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamDiskCopyInfoCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::DiskCopyInfo* obj = dynamic_cast<castor::stager::DiskCopyInfo*>(object); StreamAddress* ad = @@ -107,7 +107,7 @@ void castor::io::StreamDiskCopyInfoCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskCopyInfoCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -173,7 +173,7 @@ castor::IObject* castor::io::StreamDiskCopyInfoCnv::createObj(castor::IAddress* void castor::io::StreamDiskCopyInfoCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::DiskCopyInfo* obj = dynamic_cast<castor::stager::DiskCopyInfo*>(object); if (0 == obj) { @@ -195,7 +195,7 @@ void castor::io::StreamDiskCopyInfoCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskCopyInfoCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDiskCopyInfoCnv.hpp b/castor/io/StreamDiskCopyInfoCnv.hpp index 5be29fd1b8b62213c33b11ca588470e0fb7338c3..62d5cd371d87515d221e4d29e420aa6b5d3cb6ba 100644 --- a/castor/io/StreamDiskCopyInfoCnv.hpp +++ b/castor/io/StreamDiskCopyInfoCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDiskCopyInfoCnv diff --git a/castor/io/StreamDiskPoolQueryCnv.cpp b/castor/io/StreamDiskPoolQueryCnv.cpp index 926273e4c1e9da3fa3deccc53e4d4f5fe8fc4d65..b5a6709772a6f3eb98e18692df59cb0db8f39e29 100644 --- a/castor/io/StreamDiskPoolQueryCnv.cpp +++ b/castor/io/StreamDiskPoolQueryCnv.cpp @@ -82,7 +82,7 @@ void castor::io::StreamDiskPoolQueryCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamDiskPoolQueryCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskPoolQueryCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -170,7 +170,7 @@ castor::IObject* castor::io::StreamDiskPoolQueryCnv::createObj(castor::IAddress* void castor::io::StreamDiskPoolQueryCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); if (0 == obj) { @@ -194,7 +194,7 @@ void castor::io::StreamDiskPoolQueryCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskPoolQueryCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDiskPoolQueryCnv.hpp b/castor/io/StreamDiskPoolQueryCnv.hpp index d80b5483b5122e258e07b4d4523f971e4fd7592c..d03ecdd3ff2c527de53348e4ffcd2b11c6448c85 100644 --- a/castor/io/StreamDiskPoolQueryCnv.hpp +++ b/castor/io/StreamDiskPoolQueryCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDiskPoolQueryCnv diff --git a/castor/io/StreamDiskPoolQueryCnvOld.cpp b/castor/io/StreamDiskPoolQueryCnvOld.cpp index eae4776f9d6722d82b4516cdc6ee5e005665e687..7e76ef5dce8994c92df6d5eafbecf3ef0ba69d4c 100644 --- a/castor/io/StreamDiskPoolQueryCnvOld.cpp +++ b/castor/io/StreamDiskPoolQueryCnvOld.cpp @@ -84,7 +84,7 @@ void castor::io::StreamDiskPoolQueryCnvOld::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); StreamAddress* ad = @@ -110,7 +110,7 @@ void castor::io::StreamDiskPoolQueryCnvOld::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskPoolQueryCnvOld::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -168,7 +168,7 @@ castor::IObject* castor::io::StreamDiskPoolQueryCnvOld::createObj(castor::IAddre void castor::io::StreamDiskPoolQueryCnvOld::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery* obj = dynamic_cast<castor::query::DiskPoolQuery*>(object); if (0 == obj) { @@ -192,7 +192,7 @@ void castor::io::StreamDiskPoolQueryCnvOld::marshalObject(castor::IObject* objec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskPoolQueryCnvOld::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDiskPoolQueryCnvOld.hpp b/castor/io/StreamDiskPoolQueryCnvOld.hpp index 9e13baf523966258a986310e5723d37fef08b58c..e2fe76a566a6a1ef03ed62fb5e18012b9f4c8ea1 100644 --- a/castor/io/StreamDiskPoolQueryCnvOld.hpp +++ b/castor/io/StreamDiskPoolQueryCnvOld.hpp @@ -92,7 +92,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -104,7 +104,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -118,7 +118,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -132,7 +132,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDiskPoolQueryCnvOld diff --git a/castor/io/StreamDiskPoolQueryResponseCnv.cpp b/castor/io/StreamDiskPoolQueryResponseCnv.cpp index f62d47829a5c05e7ba70020819451367a46cd6d3..94b7ff1bf1872c2555cd368a3f3bbf10982c98ca 100644 --- a/castor/io/StreamDiskPoolQueryResponseCnv.cpp +++ b/castor/io/StreamDiskPoolQueryResponseCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamDiskPoolQueryResponseCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQueryResponse* obj = dynamic_cast<castor::query::DiskPoolQueryResponse*>(object); StreamAddress* ad = @@ -100,7 +100,7 @@ void castor::io::StreamDiskPoolQueryResponseCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskPoolQueryResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -139,7 +139,7 @@ castor::IObject* castor::io::StreamDiskPoolQueryResponseCnv::createObj(castor::I void castor::io::StreamDiskPoolQueryResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQueryResponse* obj = dynamic_cast<castor::query::DiskPoolQueryResponse*>(object); if (0 == obj) { @@ -167,7 +167,7 @@ void castor::io::StreamDiskPoolQueryResponseCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskPoolQueryResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDiskPoolQueryResponseCnv.hpp b/castor/io/StreamDiskPoolQueryResponseCnv.hpp index 400ed3430da100e295b90e0cb539406494c9e919..82955f1299f6b1712cc19a830364fcac6608cbe5 100644 --- a/castor/io/StreamDiskPoolQueryResponseCnv.hpp +++ b/castor/io/StreamDiskPoolQueryResponseCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDiskPoolQueryResponseCnv diff --git a/castor/io/StreamDiskServerDescriptionCnv.cpp b/castor/io/StreamDiskServerDescriptionCnv.cpp index 12ade734676b5a1cf320d9924f4b6f7a10b66e5e..93b6c758df86d396f188d9cfeca8ff3301d03a27 100644 --- a/castor/io/StreamDiskServerDescriptionCnv.cpp +++ b/castor/io/StreamDiskServerDescriptionCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamDiskServerDescriptionCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::DiskServerDescription* obj = dynamic_cast<castor::query::DiskServerDescription*>(object); StreamAddress* ad = @@ -99,7 +99,7 @@ void castor::io::StreamDiskServerDescriptionCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskServerDescriptionCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -132,7 +132,7 @@ castor::IObject* castor::io::StreamDiskServerDescriptionCnv::createObj(castor::I void castor::io::StreamDiskServerDescriptionCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::DiskServerDescription* obj = dynamic_cast<castor::query::DiskServerDescription*>(object); if (0 == obj) { @@ -161,7 +161,7 @@ void castor::io::StreamDiskServerDescriptionCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDiskServerDescriptionCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDiskServerDescriptionCnv.hpp b/castor/io/StreamDiskServerDescriptionCnv.hpp index adb58f15ce0c49ea1a555c805eb988597ae6f8ad..3c69d2b88849b0ef781172c446b35bcad83a4d2d 100644 --- a/castor/io/StreamDiskServerDescriptionCnv.hpp +++ b/castor/io/StreamDiskServerDescriptionCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDiskServerDescriptionCnv diff --git a/castor/io/StreamDumpNotificationCnv.cpp b/castor/io/StreamDumpNotificationCnv.cpp index ae04310ad98ad792ed65079cf31b5ea14d06df5c..86396c354f5ad0f595f9071e07d0a650bdbd19a4 100644 --- a/castor/io/StreamDumpNotificationCnv.cpp +++ b/castor/io/StreamDumpNotificationCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamDumpNotificationCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::DumpNotification* obj = dynamic_cast<castor::tape::tapegateway::DumpNotification*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamDumpNotificationCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDumpNotificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -121,7 +121,7 @@ castor::IObject* castor::io::StreamDumpNotificationCnv::createObj(castor::IAddre void castor::io::StreamDumpNotificationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::DumpNotification* obj = dynamic_cast<castor::tape::tapegateway::DumpNotification*>(object); if (0 == obj) { @@ -143,7 +143,7 @@ void castor::io::StreamDumpNotificationCnv::marshalObject(castor::IObject* objec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDumpNotificationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDumpNotificationCnv.hpp b/castor/io/StreamDumpNotificationCnv.hpp index 24e1eb191156908086f858a098cf1259f9380662..ea2727ba1b883e86f0bf8e4ba7a078803526d557 100644 --- a/castor/io/StreamDumpNotificationCnv.hpp +++ b/castor/io/StreamDumpNotificationCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDumpNotificationCnv diff --git a/castor/io/StreamDumpParametersCnv.cpp b/castor/io/StreamDumpParametersCnv.cpp index 9415c95b4ddd6e5e23305e91543d989b7d27a8eb..fbe84c668a4dcb5d2166bd0a1ba4c9ec87c57c03 100644 --- a/castor/io/StreamDumpParametersCnv.cpp +++ b/castor/io/StreamDumpParametersCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamDumpParametersCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::DumpParameters* obj = dynamic_cast<castor::tape::tapegateway::DumpParameters*>(object); StreamAddress* ad = @@ -100,7 +100,7 @@ void castor::io::StreamDumpParametersCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDumpParametersCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -148,7 +148,7 @@ castor::IObject* castor::io::StreamDumpParametersCnv::createObj(castor::IAddress void castor::io::StreamDumpParametersCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::DumpParameters* obj = dynamic_cast<castor::tape::tapegateway::DumpParameters*>(object); if (0 == obj) { @@ -170,7 +170,7 @@ void castor::io::StreamDumpParametersCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDumpParametersCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDumpParametersCnv.hpp b/castor/io/StreamDumpParametersCnv.hpp index d58a8c4c9070e90100fbd8b22b2d95e66a529348..068a25ea1b172b379801328039ac203b6f877aa0 100644 --- a/castor/io/StreamDumpParametersCnv.hpp +++ b/castor/io/StreamDumpParametersCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDumpParametersCnv diff --git a/castor/io/StreamDumpParametersRequestCnv.cpp b/castor/io/StreamDumpParametersRequestCnv.cpp index a9507d8f61b4e6f73b8148c55c834aa0e5fc4758..58a8d4c272df8d7658ad76a250850d2de6cf973e 100644 --- a/castor/io/StreamDumpParametersRequestCnv.cpp +++ b/castor/io/StreamDumpParametersRequestCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamDumpParametersRequestCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::DumpParametersRequest* obj = dynamic_cast<castor::tape::tapegateway::DumpParametersRequest*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamDumpParametersRequestCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDumpParametersRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamDumpParametersRequestCnv::createObj(castor::I void castor::io::StreamDumpParametersRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::DumpParametersRequest* obj = dynamic_cast<castor::tape::tapegateway::DumpParametersRequest*>(object); if (0 == obj) { @@ -138,7 +138,7 @@ void castor::io::StreamDumpParametersRequestCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamDumpParametersRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamDumpParametersRequestCnv.hpp b/castor/io/StreamDumpParametersRequestCnv.hpp index 88ce78a2203d72b12684ccb56d8950bb80f6a441..c2dbd58f2411be0748e480b6546adb7a1815b3cd 100644 --- a/castor/io/StreamDumpParametersRequestCnv.hpp +++ b/castor/io/StreamDumpParametersRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamDumpParametersRequestCnv diff --git a/castor/io/StreamEndNotificationCnv.cpp b/castor/io/StreamEndNotificationCnv.cpp index 11002728c061a7fcd7cb1bd22bf376e84cd611f8..22aa7789f553012712f12c2361bfb247bfe1c507 100644 --- a/castor/io/StreamEndNotificationCnv.cpp +++ b/castor/io/StreamEndNotificationCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamEndNotificationCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::EndNotification* obj = dynamic_cast<castor::tape::tapegateway::EndNotification*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamEndNotificationCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamEndNotificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamEndNotificationCnv::createObj(castor::IAddres void castor::io::StreamEndNotificationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::EndNotification* obj = dynamic_cast<castor::tape::tapegateway::EndNotification*>(object); if (0 == obj) { @@ -138,7 +138,7 @@ void castor::io::StreamEndNotificationCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamEndNotificationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamEndNotificationCnv.hpp b/castor/io/StreamEndNotificationCnv.hpp index 5f61b8aa227d20dddd8807495420ddd69a5a1be4..f65b4ba1a95a9d3a133c4887d762aeefe347d80c 100644 --- a/castor/io/StreamEndNotificationCnv.hpp +++ b/castor/io/StreamEndNotificationCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamEndNotificationCnv diff --git a/castor/io/StreamEndNotificationErrorReportCnv.cpp b/castor/io/StreamEndNotificationErrorReportCnv.cpp index 03f6ea6407e92ea42a1a9d4e922e3a488d3951df..b2bd48673f4c5e01b93f34abdfcbd60a9990e736 100644 --- a/castor/io/StreamEndNotificationErrorReportCnv.cpp +++ b/castor/io/StreamEndNotificationErrorReportCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamEndNotificationErrorReportCnv::createRep(castor::IAddress castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::EndNotificationErrorReport* obj = dynamic_cast<castor::tape::tapegateway::EndNotificationErrorReport*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamEndNotificationErrorReportCnv::createRep(castor::IAddress // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamEndNotificationErrorReportCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -125,7 +125,7 @@ castor::IObject* castor::io::StreamEndNotificationErrorReportCnv::createObj(cast void castor::io::StreamEndNotificationErrorReportCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::EndNotificationErrorReport* obj = dynamic_cast<castor::tape::tapegateway::EndNotificationErrorReport*>(object); if (0 == obj) { @@ -147,7 +147,7 @@ void castor::io::StreamEndNotificationErrorReportCnv::marshalObject(castor::IObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamEndNotificationErrorReportCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamEndNotificationErrorReportCnv.hpp b/castor/io/StreamEndNotificationErrorReportCnv.hpp index 3d59ae95d43dae60e2867badb9262ce3a7cebd11..f1c7fbc7b04743dd7ad9fec441dbba9f7ca8dcb2 100644 --- a/castor/io/StreamEndNotificationErrorReportCnv.hpp +++ b/castor/io/StreamEndNotificationErrorReportCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamEndNotificationErrorReportCnv diff --git a/castor/io/StreamEndResponseCnv.cpp b/castor/io/StreamEndResponseCnv.cpp index 2530b51b2e6d82cbf28032f01eb9691f29a3849d..11be853174f0033b18e66be747c4bd1761cbcbfb 100644 --- a/castor/io/StreamEndResponseCnv.cpp +++ b/castor/io/StreamEndResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamEndResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::EndResponse* obj = dynamic_cast<castor::rh::EndResponse*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamEndResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamEndResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -121,7 +121,7 @@ castor::IObject* castor::io::StreamEndResponseCnv::createObj(castor::IAddress* a void castor::io::StreamEndResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::EndResponse* obj = dynamic_cast<castor::rh::EndResponse*>(object); if (0 == obj) { @@ -143,7 +143,7 @@ void castor::io::StreamEndResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamEndResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamEndResponseCnv.hpp b/castor/io/StreamEndResponseCnv.hpp index db3d206695e9fb6137d70d991e15df5aa88e54d2..5b685080a956ac3a2131b8104cec4c215bc13b67 100644 --- a/castor/io/StreamEndResponseCnv.hpp +++ b/castor/io/StreamEndResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamEndResponseCnv diff --git a/castor/io/StreamFileErrorReportStructCnv.cpp b/castor/io/StreamFileErrorReportStructCnv.cpp index d163fc4c48a21e70d1347c82767244f21c6c32e1..524c67c3a03ccc3da4af62192094a5724e9bc3ac 100644 --- a/castor/io/StreamFileErrorReportStructCnv.cpp +++ b/castor/io/StreamFileErrorReportStructCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamFileErrorReportStructCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileErrorReportStruct* obj = dynamic_cast<castor::tape::tapegateway::FileErrorReportStruct*>(object); StreamAddress* ad = @@ -101,7 +101,7 @@ void castor::io::StreamFileErrorReportStructCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileErrorReportStructCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -140,7 +140,7 @@ castor::IObject* castor::io::StreamFileErrorReportStructCnv::createObj(castor::I void castor::io::StreamFileErrorReportStructCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileErrorReportStruct* obj = dynamic_cast<castor::tape::tapegateway::FileErrorReportStruct*>(object); if (0 == obj) { @@ -164,7 +164,7 @@ void castor::io::StreamFileErrorReportStructCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileErrorReportStructCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileErrorReportStructCnv.hpp b/castor/io/StreamFileErrorReportStructCnv.hpp index 45126504434cd2bc13092a46d5a12b9d19c21a27..8f9c350d2c38cc8d0d09bc6ae195e426e8985299 100644 --- a/castor/io/StreamFileErrorReportStructCnv.hpp +++ b/castor/io/StreamFileErrorReportStructCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileErrorReportStructCnv diff --git a/castor/io/StreamFileMigratedNotificationStructCnv.cpp b/castor/io/StreamFileMigratedNotificationStructCnv.cpp index d35dfc2685b296bf6711f9cc3d24829a9fd3a7ba..8b6168e76da78a6de7ad93d6529083646b91c2ec 100644 --- a/castor/io/StreamFileMigratedNotificationStructCnv.cpp +++ b/castor/io/StreamFileMigratedNotificationStructCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamFileMigratedNotificationStructCnv::createRep(castor::IAdd castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileMigratedNotificationStruct* obj = dynamic_cast<castor::tape::tapegateway::FileMigratedNotificationStruct*>(object); StreamAddress* ad = @@ -106,7 +106,7 @@ void castor::io::StreamFileMigratedNotificationStructCnv::createRep(castor::IAdd // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileMigratedNotificationStructCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamFileMigratedNotificationStructCnv::createObj( void castor::io::StreamFileMigratedNotificationStructCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileMigratedNotificationStruct* obj = dynamic_cast<castor::tape::tapegateway::FileMigratedNotificationStruct*>(object); if (0 == obj) { @@ -186,7 +186,7 @@ void castor::io::StreamFileMigratedNotificationStructCnv::marshalObject(castor:: //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileMigratedNotificationStructCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileMigratedNotificationStructCnv.hpp b/castor/io/StreamFileMigratedNotificationStructCnv.hpp index 500f1ac242008b0b588477b76db65a04d434c610..78d7c0bb2787e8d3390bb8480abc61a573e5ec57 100644 --- a/castor/io/StreamFileMigratedNotificationStructCnv.hpp +++ b/castor/io/StreamFileMigratedNotificationStructCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileMigratedNotificationStructCnv diff --git a/castor/io/StreamFileMigrationReportListCnv.cpp b/castor/io/StreamFileMigrationReportListCnv.cpp index daaa3205d9b4e6cb5691846f30902101ff85b2a8..326c96bdfaf46131ae62b086ef501f8922b44c2d 100644 --- a/castor/io/StreamFileMigrationReportListCnv.cpp +++ b/castor/io/StreamFileMigrationReportListCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamFileMigrationReportListCnv::createRep(castor::IAddress* a castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileMigrationReportList* obj = dynamic_cast<castor::tape::tapegateway::FileMigrationReportList*>(object); StreamAddress* ad = @@ -97,7 +97,7 @@ void castor::io::StreamFileMigrationReportListCnv::createRep(castor::IAddress* a // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileMigrationReportListCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -127,7 +127,7 @@ castor::IObject* castor::io::StreamFileMigrationReportListCnv::createObj(castor: void castor::io::StreamFileMigrationReportListCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileMigrationReportList* obj = dynamic_cast<castor::tape::tapegateway::FileMigrationReportList*>(object); if (0 == obj) { @@ -161,7 +161,7 @@ void castor::io::StreamFileMigrationReportListCnv::marshalObject(castor::IObject //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileMigrationReportListCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileMigrationReportListCnv.hpp b/castor/io/StreamFileMigrationReportListCnv.hpp index a0c46b0d265f3a2a0599257b02d418105a7a1a6a..85c8d0788ff73776a30683de637067437c73512b 100644 --- a/castor/io/StreamFileMigrationReportListCnv.hpp +++ b/castor/io/StreamFileMigrationReportListCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileMigrationReportListCnv diff --git a/castor/io/StreamFileQryResponseCnv.cpp b/castor/io/StreamFileQryResponseCnv.cpp index 2e5327c622b558ff2e93366b6fd2832979ea8392..36a4b4c0487fcc99bc3a650139a1db518858d7c6 100644 --- a/castor/io/StreamFileQryResponseCnv.cpp +++ b/castor/io/StreamFileQryResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamFileQryResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::FileQryResponse* obj = dynamic_cast<castor::rh::FileQryResponse*>(object); StreamAddress* ad = @@ -104,7 +104,7 @@ void castor::io::StreamFileQryResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileQryResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -161,7 +161,7 @@ castor::IObject* castor::io::StreamFileQryResponseCnv::createObj(castor::IAddres void castor::io::StreamFileQryResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::FileQryResponse* obj = dynamic_cast<castor::rh::FileQryResponse*>(object); if (0 == obj) { @@ -183,7 +183,7 @@ void castor::io::StreamFileQryResponseCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileQryResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileQryResponseCnv.hpp b/castor/io/StreamFileQryResponseCnv.hpp index 6ac548418807da7c4b1aa4c0d6eb1353a8f0c096..23e5516feff989654de85d26730d24be1938eaf8 100644 --- a/castor/io/StreamFileQryResponseCnv.hpp +++ b/castor/io/StreamFileQryResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileQryResponseCnv diff --git a/castor/io/StreamFileRecallReportListCnv.cpp b/castor/io/StreamFileRecallReportListCnv.cpp index 5527eb80f1419ebbb5718eb92e76ed62c44ec589..3aaea5786f507390343d2a25851aabca4b5352c6 100644 --- a/castor/io/StreamFileRecallReportListCnv.cpp +++ b/castor/io/StreamFileRecallReportListCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamFileRecallReportListCnv::createRep(castor::IAddress* addr castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileRecallReportList* obj = dynamic_cast<castor::tape::tapegateway::FileRecallReportList*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamFileRecallReportListCnv::createRep(castor::IAddress* addr // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileRecallReportListCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -119,7 +119,7 @@ castor::IObject* castor::io::StreamFileRecallReportListCnv::createObj(castor::IA void castor::io::StreamFileRecallReportListCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileRecallReportList* obj = dynamic_cast<castor::tape::tapegateway::FileRecallReportList*>(object); if (0 == obj) { @@ -153,7 +153,7 @@ void castor::io::StreamFileRecallReportListCnv::marshalObject(castor::IObject* o //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileRecallReportListCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileRecallReportListCnv.hpp b/castor/io/StreamFileRecallReportListCnv.hpp index ca8d2584d70fadd596b8db6d8468cdec9dac9988..cb21ee6f519a09ec578dfbbe11be3f6a07adda58 100644 --- a/castor/io/StreamFileRecallReportListCnv.hpp +++ b/castor/io/StreamFileRecallReportListCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileRecallReportListCnv diff --git a/castor/io/StreamFileRecalledNotificationStructCnv.cpp b/castor/io/StreamFileRecalledNotificationStructCnv.cpp index b61fd85ed80f289757de3c46435ad536d290b8a9..1d688efe6e6c03f3b933b26b4dcf26edadc9c252 100644 --- a/castor/io/StreamFileRecalledNotificationStructCnv.cpp +++ b/castor/io/StreamFileRecalledNotificationStructCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamFileRecalledNotificationStructCnv::createRep(castor::IAdd castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileRecalledNotificationStruct* obj = dynamic_cast<castor::tape::tapegateway::FileRecalledNotificationStruct*>(object); StreamAddress* ad = @@ -102,7 +102,7 @@ void castor::io::StreamFileRecalledNotificationStructCnv::createRep(castor::IAdd // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileRecalledNotificationStructCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -147,7 +147,7 @@ castor::IObject* castor::io::StreamFileRecalledNotificationStructCnv::createObj( void castor::io::StreamFileRecalledNotificationStructCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileRecalledNotificationStruct* obj = dynamic_cast<castor::tape::tapegateway::FileRecalledNotificationStruct*>(object); if (0 == obj) { @@ -170,7 +170,7 @@ void castor::io::StreamFileRecalledNotificationStructCnv::marshalObject(castor:: //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileRecalledNotificationStructCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileRecalledNotificationStructCnv.hpp b/castor/io/StreamFileRecalledNotificationStructCnv.hpp index c865c86f9f8d5f6101aae1aec602454e2039411c..4e3eef6609468165500fd300467f7bbfcd8da63a 100644 --- a/castor/io/StreamFileRecalledNotificationStructCnv.hpp +++ b/castor/io/StreamFileRecalledNotificationStructCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileRecalledNotificationStructCnv diff --git a/castor/io/StreamFileResponseCnv.cpp b/castor/io/StreamFileResponseCnv.cpp index 305038f2c4b5c1d254aeba49770780a0f2a71959..b6be8409df052b42930cb9e18ebfcaf8915244f2 100644 --- a/castor/io/StreamFileResponseCnv.cpp +++ b/castor/io/StreamFileResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamFileResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::FileResponse* obj = dynamic_cast<castor::rh::FileResponse*>(object); StreamAddress* ad = @@ -99,7 +99,7 @@ void castor::io::StreamFileResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -141,7 +141,7 @@ castor::IObject* castor::io::StreamFileResponseCnv::createObj(castor::IAddress* void castor::io::StreamFileResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::FileResponse* obj = dynamic_cast<castor::rh::FileResponse*>(object); if (0 == obj) { @@ -163,7 +163,7 @@ void castor::io::StreamFileResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileResponseCnv.hpp b/castor/io/StreamFileResponseCnv.hpp index d3499a1468570d54ec31462c4c8a3ec48d0ac6c8..0e53cd23f6b0e3d6bed0d23173121c43c97dd832 100644 --- a/castor/io/StreamFileResponseCnv.hpp +++ b/castor/io/StreamFileResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileResponseCnv diff --git a/castor/io/StreamFileSystemDescriptionCnv.cpp b/castor/io/StreamFileSystemDescriptionCnv.cpp index 26bfee2d8b32d3649bda94d60ed445024a4fe309..a9b7c433b431b003a24a26e5eaa2caaf3d193e40 100644 --- a/castor/io/StreamFileSystemDescriptionCnv.cpp +++ b/castor/io/StreamFileSystemDescriptionCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamFileSystemDescriptionCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::FileSystemDescription* obj = dynamic_cast<castor::query::FileSystemDescription*>(object); StreamAddress* ad = @@ -99,7 +99,7 @@ void castor::io::StreamFileSystemDescriptionCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileSystemDescriptionCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -138,7 +138,7 @@ castor::IObject* castor::io::StreamFileSystemDescriptionCnv::createObj(castor::I void castor::io::StreamFileSystemDescriptionCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::FileSystemDescription* obj = dynamic_cast<castor::query::FileSystemDescription*>(object); if (0 == obj) { @@ -161,7 +161,7 @@ void castor::io::StreamFileSystemDescriptionCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileSystemDescriptionCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileSystemDescriptionCnv.hpp b/castor/io/StreamFileSystemDescriptionCnv.hpp index dc289e32489179c675269fc17b335c4c699cb2db..587cbb18722d11306ca267bbceed7fc9d0ab7988 100644 --- a/castor/io/StreamFileSystemDescriptionCnv.hpp +++ b/castor/io/StreamFileSystemDescriptionCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileSystemDescriptionCnv diff --git a/castor/io/StreamFileToMigrateStructCnv.cpp b/castor/io/StreamFileToMigrateStructCnv.cpp index 31ded5ce3a77ff71e36883deb7a57d0e35496f6d..aec2b0d2b1044f47827ff4995fe01e8d53d4950b 100644 --- a/castor/io/StreamFileToMigrateStructCnv.cpp +++ b/castor/io/StreamFileToMigrateStructCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamFileToMigrateStructCnv::createRep(castor::IAddress* addre castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileToMigrateStruct* obj = dynamic_cast<castor::tape::tapegateway::FileToMigrateStruct*>(object); StreamAddress* ad = @@ -103,7 +103,7 @@ void castor::io::StreamFileToMigrateStructCnv::createRep(castor::IAddress* addre // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileToMigrateStructCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -151,7 +151,7 @@ castor::IObject* castor::io::StreamFileToMigrateStructCnv::createObj(castor::IAd void castor::io::StreamFileToMigrateStructCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileToMigrateStruct* obj = dynamic_cast<castor::tape::tapegateway::FileToMigrateStruct*>(object); if (0 == obj) { @@ -174,7 +174,7 @@ void castor::io::StreamFileToMigrateStructCnv::marshalObject(castor::IObject* ob //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileToMigrateStructCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileToMigrateStructCnv.hpp b/castor/io/StreamFileToMigrateStructCnv.hpp index c70d2db35b92d31b2499f101aabdf53fcf297e4c..208bba1e8857a5d3751201dd6de905233652df81 100644 --- a/castor/io/StreamFileToMigrateStructCnv.hpp +++ b/castor/io/StreamFileToMigrateStructCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileToMigrateStructCnv diff --git a/castor/io/StreamFileToRecallStructCnv.cpp b/castor/io/StreamFileToRecallStructCnv.cpp index 3a6fba5087360ea093a5fd2f526ee312984d0d0e..29da6d295e56d92f35736182b7a01d614da7ee60 100644 --- a/castor/io/StreamFileToRecallStructCnv.cpp +++ b/castor/io/StreamFileToRecallStructCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamFileToRecallStructCnv::createRep(castor::IAddress* addres castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileToRecallStruct* obj = dynamic_cast<castor::tape::tapegateway::FileToRecallStruct*>(object); StreamAddress* ad = @@ -104,7 +104,7 @@ void castor::io::StreamFileToRecallStructCnv::createRep(castor::IAddress* addres // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileToRecallStructCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -155,7 +155,7 @@ castor::IObject* castor::io::StreamFileToRecallStructCnv::createObj(castor::IAdd void castor::io::StreamFileToRecallStructCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FileToRecallStruct* obj = dynamic_cast<castor::tape::tapegateway::FileToRecallStruct*>(object); if (0 == obj) { @@ -178,7 +178,7 @@ void castor::io::StreamFileToRecallStructCnv::marshalObject(castor::IObject* obj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFileToRecallStructCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFileToRecallStructCnv.hpp b/castor/io/StreamFileToRecallStructCnv.hpp index 0a75546a837d4af024fa625c801abea8ed56cf5c..b2219237129ce25ba38a5a15181bf0848077df4d 100644 --- a/castor/io/StreamFileToRecallStructCnv.hpp +++ b/castor/io/StreamFileToRecallStructCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileToRecallStructCnv diff --git a/castor/io/StreamFiles2DeleteCnv.cpp b/castor/io/StreamFiles2DeleteCnv.cpp index 77806901a148552a67aaaa2e6981d02b02efbe3e..8f1061a2e3a5fcfc55f0988e1bce5ef9e3c2cd76 100644 --- a/castor/io/StreamFiles2DeleteCnv.cpp +++ b/castor/io/StreamFiles2DeleteCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamFiles2DeleteCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); StreamAddress* ad = @@ -107,7 +107,7 @@ void castor::io::StreamFiles2DeleteCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFiles2DeleteCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -165,7 +165,7 @@ castor::IObject* castor::io::StreamFiles2DeleteCnv::createObj(castor::IAddress* void castor::io::StreamFiles2DeleteCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::Files2Delete* obj = dynamic_cast<castor::stager::Files2Delete*>(object); if (0 == obj) { @@ -189,7 +189,7 @@ void castor::io::StreamFiles2DeleteCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFiles2DeleteCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFiles2DeleteCnv.hpp b/castor/io/StreamFiles2DeleteCnv.hpp index 0c31e37992339dea785194d883ca55cbf88d4a72..ae36074c050c598f0cd90b8c850f5e7bcd3e377b 100644 --- a/castor/io/StreamFiles2DeleteCnv.hpp +++ b/castor/io/StreamFiles2DeleteCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFiles2DeleteCnv diff --git a/castor/io/StreamFilesDeletedCnv.cpp b/castor/io/StreamFilesDeletedCnv.cpp index c429bca3fca81a489b73f481e23ec4d9016a4c5a..9bd9a146c6925ac5baef9e9e8a249653777a7462 100644 --- a/castor/io/StreamFilesDeletedCnv.cpp +++ b/castor/io/StreamFilesDeletedCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamFilesDeletedCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamFilesDeletedCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesDeletedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamFilesDeletedCnv::createObj(castor::IAddress* void castor::io::StreamFilesDeletedCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::FilesDeleted* obj = dynamic_cast<castor::stager::FilesDeleted*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamFilesDeletedCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesDeletedCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesDeletedCnv.hpp b/castor/io/StreamFilesDeletedCnv.hpp index 70a948533e0e6977aba2bf0f0f4cdf5efc82b192..45096a7e28ed701f6d5ed4241f7d8d412bbf94b6 100644 --- a/castor/io/StreamFilesDeletedCnv.hpp +++ b/castor/io/StreamFilesDeletedCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesDeletedCnv diff --git a/castor/io/StreamFilesDeletionFailedCnv.cpp b/castor/io/StreamFilesDeletionFailedCnv.cpp index da8023b296b7451f31bc4c8b617f593bcb049f30..d2c696466287b4afc458b7ab7456bf80b6efe33f 100644 --- a/castor/io/StreamFilesDeletionFailedCnv.cpp +++ b/castor/io/StreamFilesDeletionFailedCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamFilesDeletionFailedCnv::createRep(castor::IAddress* addre castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamFilesDeletionFailedCnv::createRep(castor::IAddress* addre // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesDeletionFailedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamFilesDeletionFailedCnv::createObj(castor::IAd void castor::io::StreamFilesDeletionFailedCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::FilesDeletionFailed* obj = dynamic_cast<castor::stager::FilesDeletionFailed*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamFilesDeletionFailedCnv::marshalObject(castor::IObject* ob //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesDeletionFailedCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesDeletionFailedCnv.hpp b/castor/io/StreamFilesDeletionFailedCnv.hpp index 4d910be4a40f870fbae54e1e0806a745da02e7a7..9d612b78d7081ebdde3e4584f32e232de5868e09 100644 --- a/castor/io/StreamFilesDeletionFailedCnv.hpp +++ b/castor/io/StreamFilesDeletionFailedCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesDeletionFailedCnv diff --git a/castor/io/StreamFilesListRequestCnv.cpp b/castor/io/StreamFilesListRequestCnv.cpp index 5cc4c81a9456827dcfe321d47a358a7ab92c2719..9fb9a1033391a8206e7077c2edafb86a54a701eb 100644 --- a/castor/io/StreamFilesListRequestCnv.cpp +++ b/castor/io/StreamFilesListRequestCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamFilesListRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesListRequest* obj = dynamic_cast<castor::tape::tapegateway::FilesListRequest*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamFilesListRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesListRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -124,7 +124,7 @@ castor::IObject* castor::io::StreamFilesListRequestCnv::createObj(castor::IAddre void castor::io::StreamFilesListRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesListRequest* obj = dynamic_cast<castor::tape::tapegateway::FilesListRequest*>(object); if (0 == obj) { @@ -146,7 +146,7 @@ void castor::io::StreamFilesListRequestCnv::marshalObject(castor::IObject* objec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesListRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesListRequestCnv.hpp b/castor/io/StreamFilesListRequestCnv.hpp index 8456f8f96c90fbb7549e73cbbf4a7ec74776d4e8..dee22aeeb8795ae92b48bca590ba8205c8ce686b 100644 --- a/castor/io/StreamFilesListRequestCnv.hpp +++ b/castor/io/StreamFilesListRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesListRequestCnv diff --git a/castor/io/StreamFilesToMigrateListCnv.cpp b/castor/io/StreamFilesToMigrateListCnv.cpp index edfb81bdfe5eeacf1eef9f97e7eab476a6c63fd6..fc9ddaf4a549d0a91fd77ee59c0877082a6c848c 100644 --- a/castor/io/StreamFilesToMigrateListCnv.cpp +++ b/castor/io/StreamFilesToMigrateListCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamFilesToMigrateListCnv::createRep(castor::IAddress* addres castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToMigrateList* obj = dynamic_cast<castor::tape::tapegateway::FilesToMigrateList*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamFilesToMigrateListCnv::createRep(castor::IAddress* addres // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToMigrateListCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -118,7 +118,7 @@ castor::IObject* castor::io::StreamFilesToMigrateListCnv::createObj(castor::IAdd void castor::io::StreamFilesToMigrateListCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToMigrateList* obj = dynamic_cast<castor::tape::tapegateway::FilesToMigrateList*>(object); if (0 == obj) { @@ -146,7 +146,7 @@ void castor::io::StreamFilesToMigrateListCnv::marshalObject(castor::IObject* obj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToMigrateListCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesToMigrateListCnv.hpp b/castor/io/StreamFilesToMigrateListCnv.hpp index 74c939daf181724829fae765ea86f25ee174c3a1..cb1a10fd5da5218b25783bbb457a6a47a2dd8274 100644 --- a/castor/io/StreamFilesToMigrateListCnv.hpp +++ b/castor/io/StreamFilesToMigrateListCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesToMigrateListCnv diff --git a/castor/io/StreamFilesToMigrateListRequestCnv.cpp b/castor/io/StreamFilesToMigrateListRequestCnv.cpp index 6fc4f4761cb6651dc3c28017e070563a30e0d772..7db7820b89d4bae030ab3c7695429d914c29dcba 100644 --- a/castor/io/StreamFilesToMigrateListRequestCnv.cpp +++ b/castor/io/StreamFilesToMigrateListRequestCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamFilesToMigrateListRequestCnv::createRep(castor::IAddress* castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToMigrateListRequest* obj = dynamic_cast<castor::tape::tapegateway::FilesToMigrateListRequest*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamFilesToMigrateListRequestCnv::createRep(castor::IAddress* // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToMigrateListRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -124,7 +124,7 @@ castor::IObject* castor::io::StreamFilesToMigrateListRequestCnv::createObj(casto void castor::io::StreamFilesToMigrateListRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToMigrateListRequest* obj = dynamic_cast<castor::tape::tapegateway::FilesToMigrateListRequest*>(object); if (0 == obj) { @@ -146,7 +146,7 @@ void castor::io::StreamFilesToMigrateListRequestCnv::marshalObject(castor::IObje //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToMigrateListRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesToMigrateListRequestCnv.hpp b/castor/io/StreamFilesToMigrateListRequestCnv.hpp index 0c1ece1a977d3f5ecf2add872134f0f82943b332..227f81e94ce60c8047569f1f649fcef5648c978b 100644 --- a/castor/io/StreamFilesToMigrateListRequestCnv.hpp +++ b/castor/io/StreamFilesToMigrateListRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesToMigrateListRequestCnv diff --git a/castor/io/StreamFilesToRecallListCnv.cpp b/castor/io/StreamFilesToRecallListCnv.cpp index 836e711dbec413e2a6b3654e0f25e52ef29efd2d..90cdfc56148ec5424ae968a7845e173612e1f75f 100644 --- a/castor/io/StreamFilesToRecallListCnv.cpp +++ b/castor/io/StreamFilesToRecallListCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamFilesToRecallListCnv::createRep(castor::IAddress* address castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToRecallList* obj = dynamic_cast<castor::tape::tapegateway::FilesToRecallList*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamFilesToRecallListCnv::createRep(castor::IAddress* address // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToRecallListCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -118,7 +118,7 @@ castor::IObject* castor::io::StreamFilesToRecallListCnv::createObj(castor::IAddr void castor::io::StreamFilesToRecallListCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToRecallList* obj = dynamic_cast<castor::tape::tapegateway::FilesToRecallList*>(object); if (0 == obj) { @@ -146,7 +146,7 @@ void castor::io::StreamFilesToRecallListCnv::marshalObject(castor::IObject* obje //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToRecallListCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesToRecallListCnv.hpp b/castor/io/StreamFilesToRecallListCnv.hpp index ffc93c5af8302c0adf90c1db9b85edf35f76ed0b..2ae8626071e81419a1adf93e1ebd152fba1db903 100644 --- a/castor/io/StreamFilesToRecallListCnv.hpp +++ b/castor/io/StreamFilesToRecallListCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesToRecallListCnv diff --git a/castor/io/StreamFilesToRecallListRequestCnv.cpp b/castor/io/StreamFilesToRecallListRequestCnv.cpp index 28eea3988169f93ead5b21d39729a4affe9b509d..f8ebdae85481512c49e2d0d6a548387ae1d5464f 100644 --- a/castor/io/StreamFilesToRecallListRequestCnv.cpp +++ b/castor/io/StreamFilesToRecallListRequestCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamFilesToRecallListRequestCnv::createRep(castor::IAddress* castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToRecallListRequest* obj = dynamic_cast<castor::tape::tapegateway::FilesToRecallListRequest*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamFilesToRecallListRequestCnv::createRep(castor::IAddress* // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToRecallListRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -124,7 +124,7 @@ castor::IObject* castor::io::StreamFilesToRecallListRequestCnv::createObj(castor void castor::io::StreamFilesToRecallListRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::FilesToRecallListRequest* obj = dynamic_cast<castor::tape::tapegateway::FilesToRecallListRequest*>(object); if (0 == obj) { @@ -146,7 +146,7 @@ void castor::io::StreamFilesToRecallListRequestCnv::marshalObject(castor::IObjec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFilesToRecallListRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFilesToRecallListRequestCnv.hpp b/castor/io/StreamFilesToRecallListRequestCnv.hpp index 9f4243b162c8b4d7994120e059d71e862034b4a4..04d645e3b5808ad6b30f697e6a068fa1372e0873 100644 --- a/castor/io/StreamFilesToRecallListRequestCnv.hpp +++ b/castor/io/StreamFilesToRecallListRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFilesToRecallListRequestCnv diff --git a/castor/io/StreamFirstByteWrittenCnv.cpp b/castor/io/StreamFirstByteWrittenCnv.cpp index 73449f502972c38d2de16e01d6304c5cc1edddcf..6facd0995f5ff748cfee7a48efe7f02639752610 100644 --- a/castor/io/StreamFirstByteWrittenCnv.cpp +++ b/castor/io/StreamFirstByteWrittenCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamFirstByteWrittenCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamFirstByteWrittenCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFirstByteWrittenCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -173,7 +173,7 @@ castor::IObject* castor::io::StreamFirstByteWrittenCnv::createObj(castor::IAddre void castor::io::StreamFirstByteWrittenCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::FirstByteWritten* obj = dynamic_cast<castor::stager::FirstByteWritten*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamFirstByteWrittenCnv::marshalObject(castor::IObject* objec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamFirstByteWrittenCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamFirstByteWrittenCnv.hpp b/castor/io/StreamFirstByteWrittenCnv.hpp index 47762111d7fefd4549e4b1feba149f2876cb94f6..5574536a67e304bfd607859c9bfc559df5024e73 100644 --- a/castor/io/StreamFirstByteWrittenCnv.hpp +++ b/castor/io/StreamFirstByteWrittenCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFirstByteWrittenCnv diff --git a/castor/io/StreamGCFileCnv.cpp b/castor/io/StreamGCFileCnv.cpp index de4596504e306023b75dfe6be94a9271d2eec706..47eb984278fad91fd4af2045ac814b72f0fc59d7 100644 --- a/castor/io/StreamGCFileCnv.cpp +++ b/castor/io/StreamGCFileCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamGCFileCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamGCFileCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGCFileCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -113,7 +113,7 @@ castor::IObject* castor::io::StreamGCFileCnv::createObj(castor::IAddress* addres void castor::io::StreamGCFileCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::GCFile* obj = dynamic_cast<castor::stager::GCFile*>(object); if (0 == obj) { @@ -136,7 +136,7 @@ void castor::io::StreamGCFileCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGCFileCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGCFileCnv.hpp b/castor/io/StreamGCFileCnv.hpp index b3aaf325a01b5d8a799a5d221836de53020ed0c3..c148cfc2ff16f1609082183fa6adaea9bbc06866 100644 --- a/castor/io/StreamGCFileCnv.hpp +++ b/castor/io/StreamGCFileCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGCFileCnv diff --git a/castor/io/StreamGCFilesResponseCnv.cpp b/castor/io/StreamGCFilesResponseCnv.cpp index 4d2bfd0df2652f691ab0c46d3abb6cf7eee1860d..7a515e2cbd1de60ef3ac7d8f5e0f6b5827c598c8 100644 --- a/castor/io/StreamGCFilesResponseCnv.cpp +++ b/castor/io/StreamGCFilesResponseCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamGCFilesResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::GCFilesResponse* obj = dynamic_cast<castor::rh::GCFilesResponse*>(object); StreamAddress* ad = @@ -96,7 +96,7 @@ void castor::io::StreamGCFilesResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGCFilesResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -123,7 +123,7 @@ castor::IObject* castor::io::StreamGCFilesResponseCnv::createObj(castor::IAddres void castor::io::StreamGCFilesResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::GCFilesResponse* obj = dynamic_cast<castor::rh::GCFilesResponse*>(object); if (0 == obj) { @@ -151,7 +151,7 @@ void castor::io::StreamGCFilesResponseCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGCFilesResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGCFilesResponseCnv.hpp b/castor/io/StreamGCFilesResponseCnv.hpp index 07ef48ef31ee519567609ebbc847d4c8034b5a8b..80fd788812e31a9e82b76a8c4eb46e1dec634998 100644 --- a/castor/io/StreamGCFilesResponseCnv.hpp +++ b/castor/io/StreamGCFilesResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGCFilesResponseCnv diff --git a/castor/io/StreamGCLocalFileCnv.cpp b/castor/io/StreamGCLocalFileCnv.cpp index a1bc2230204343ddbc400e14721c60bc9d188ec8..d0a5b7f8d453fee35d1ff924b46188d420a38229 100644 --- a/castor/io/StreamGCLocalFileCnv.cpp +++ b/castor/io/StreamGCLocalFileCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamGCLocalFileCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); StreamAddress* ad = @@ -100,7 +100,7 @@ void castor::io::StreamGCLocalFileCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGCLocalFileCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -145,7 +145,7 @@ castor::IObject* castor::io::StreamGCLocalFileCnv::createObj(castor::IAddress* a void castor::io::StreamGCLocalFileCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::GCLocalFile* obj = dynamic_cast<castor::stager::GCLocalFile*>(object); if (0 == obj) { @@ -167,7 +167,7 @@ void castor::io::StreamGCLocalFileCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGCLocalFileCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGCLocalFileCnv.hpp b/castor/io/StreamGCLocalFileCnv.hpp index 9d23c7f293823407bd855b31f226946307e0c13a..93ae83d882bb8d4dcd3a78000ec991145f58c888 100644 --- a/castor/io/StreamGCLocalFileCnv.hpp +++ b/castor/io/StreamGCLocalFileCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGCLocalFileCnv diff --git a/castor/io/StreamGetUpdateDoneCnv.cpp b/castor/io/StreamGetUpdateDoneCnv.cpp index a399795945597dd7db4fcac7371bad8088da44f4..e00ae311bccba1c68b756fdb1590bb2414561272 100644 --- a/castor/io/StreamGetUpdateDoneCnv.cpp +++ b/castor/io/StreamGetUpdateDoneCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamGetUpdateDoneCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamGetUpdateDoneCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateDoneCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -173,7 +173,7 @@ castor::IObject* castor::io::StreamGetUpdateDoneCnv::createObj(castor::IAddress* void castor::io::StreamGetUpdateDoneCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateDone* obj = dynamic_cast<castor::stager::GetUpdateDone*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamGetUpdateDoneCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateDoneCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGetUpdateDoneCnv.hpp b/castor/io/StreamGetUpdateDoneCnv.hpp index 8464ec8e33124a67aac2405b9442630b26a0baf9..ba5533f0cee071e6994b54f9edd947b0d228fe7f 100644 --- a/castor/io/StreamGetUpdateDoneCnv.hpp +++ b/castor/io/StreamGetUpdateDoneCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGetUpdateDoneCnv diff --git a/castor/io/StreamGetUpdateFailedCnv.cpp b/castor/io/StreamGetUpdateFailedCnv.cpp index 4039f6608d94790eda6930cb0a02a6f43bf0f3c5..20c55bec7f00240b1f551a3e8681083d2051d6cc 100644 --- a/castor/io/StreamGetUpdateFailedCnv.cpp +++ b/castor/io/StreamGetUpdateFailedCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamGetUpdateFailedCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamGetUpdateFailedCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateFailedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -173,7 +173,7 @@ castor::IObject* castor::io::StreamGetUpdateFailedCnv::createObj(castor::IAddres void castor::io::StreamGetUpdateFailedCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateFailed* obj = dynamic_cast<castor::stager::GetUpdateFailed*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamGetUpdateFailedCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateFailedCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGetUpdateFailedCnv.hpp b/castor/io/StreamGetUpdateFailedCnv.hpp index 8e6c9103d47f1f9e9a52deb5daa5150b50cb8ab1..d894204425f0e0f527282101c18d9346be6f6c67 100644 --- a/castor/io/StreamGetUpdateFailedCnv.hpp +++ b/castor/io/StreamGetUpdateFailedCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGetUpdateFailedCnv diff --git a/castor/io/StreamGetUpdateStartRequestCnv.cpp b/castor/io/StreamGetUpdateStartRequestCnv.cpp index cdd338afa850738fb4c7d6b21cf9db1f99e5263d..c22fd070484536e690cdd8a7207940bef59da706 100644 --- a/castor/io/StreamGetUpdateStartRequestCnv.cpp +++ b/castor/io/StreamGetUpdateStartRequestCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamGetUpdateStartRequestCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); StreamAddress* ad = @@ -111,7 +111,7 @@ void castor::io::StreamGetUpdateStartRequestCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateStartRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -181,7 +181,7 @@ castor::IObject* castor::io::StreamGetUpdateStartRequestCnv::createObj(castor::I void castor::io::StreamGetUpdateStartRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::GetUpdateStartRequest* obj = dynamic_cast<castor::stager::GetUpdateStartRequest*>(object); if (0 == obj) { @@ -205,7 +205,7 @@ void castor::io::StreamGetUpdateStartRequestCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateStartRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGetUpdateStartRequestCnv.hpp b/castor/io/StreamGetUpdateStartRequestCnv.hpp index 6c4c0edf13524b6f09b727edbcb004991065095c..023d021e834450135770a28ffdfad36b448c5927 100644 --- a/castor/io/StreamGetUpdateStartRequestCnv.hpp +++ b/castor/io/StreamGetUpdateStartRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGetUpdateStartRequestCnv diff --git a/castor/io/StreamGetUpdateStartResponseCnv.cpp b/castor/io/StreamGetUpdateStartResponseCnv.cpp index a723b1f3d924b7f01c853d24b0b658f52643a122..1b62f8c58072f82b45283bb1597ddfbfdc9dffff 100644 --- a/castor/io/StreamGetUpdateStartResponseCnv.cpp +++ b/castor/io/StreamGetUpdateStartResponseCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamGetUpdateStartResponseCnv::createRep(castor::IAddress* ad castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::GetUpdateStartResponse* obj = dynamic_cast<castor::rh::GetUpdateStartResponse*>(object); StreamAddress* ad = @@ -98,7 +98,7 @@ void castor::io::StreamGetUpdateStartResponseCnv::createRep(castor::IAddress* ad // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateStartResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -131,7 +131,7 @@ castor::IObject* castor::io::StreamGetUpdateStartResponseCnv::createObj(castor:: void castor::io::StreamGetUpdateStartResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::GetUpdateStartResponse* obj = dynamic_cast<castor::rh::GetUpdateStartResponse*>(object); if (0 == obj) { @@ -159,7 +159,7 @@ void castor::io::StreamGetUpdateStartResponseCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamGetUpdateStartResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamGetUpdateStartResponseCnv.hpp b/castor/io/StreamGetUpdateStartResponseCnv.hpp index a2daa2bec44083b05ce1b4d5e19d76785378cccc..ed86bfd1f030006a4a24c84180992934cef10855 100644 --- a/castor/io/StreamGetUpdateStartResponseCnv.hpp +++ b/castor/io/StreamGetUpdateStartResponseCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamGetUpdateStartResponseCnv diff --git a/castor/io/StreamIOResponseCnv.cpp b/castor/io/StreamIOResponseCnv.cpp index ed75cf5386aaf295dd703905ceaf9abda7ec49af..98c6801c5bf5d04462762484ea130ae81a447719 100644 --- a/castor/io/StreamIOResponseCnv.cpp +++ b/castor/io/StreamIOResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamIOResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::IOResponse* obj = dynamic_cast<castor::rh::IOResponse*>(object); StreamAddress* ad = @@ -103,7 +103,7 @@ void castor::io::StreamIOResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamIOResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -157,7 +157,7 @@ castor::IObject* castor::io::StreamIOResponseCnv::createObj(castor::IAddress* ad void castor::io::StreamIOResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::IOResponse* obj = dynamic_cast<castor::rh::IOResponse*>(object); if (0 == obj) { @@ -179,7 +179,7 @@ void castor::io::StreamIOResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamIOResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamIOResponseCnv.hpp b/castor/io/StreamIOResponseCnv.hpp index 0ee08499e72eab8cbad48eb517e06258161039ea..56b555c074a95ca5e49494d0de6a67472163f480 100644 --- a/castor/io/StreamIOResponseCnv.hpp +++ b/castor/io/StreamIOResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamIOResponseCnv diff --git a/castor/io/StreamListPrivilegesCnv.cpp b/castor/io/StreamListPrivilegesCnv.cpp index d1481a9ecff3eb5d373042bb197d2d6930cd54a0..046cb6e930c7836203044deed3327aa778f85c84 100644 --- a/castor/io/StreamListPrivilegesCnv.cpp +++ b/castor/io/StreamListPrivilegesCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamListPrivilegesCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamListPrivilegesCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamListPrivilegesCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -173,7 +173,7 @@ castor::IObject* castor::io::StreamListPrivilegesCnv::createObj(castor::IAddress void castor::io::StreamListPrivilegesCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges* obj = dynamic_cast<castor::bwlist::ListPrivileges*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamListPrivilegesCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamListPrivilegesCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamListPrivilegesCnv.hpp b/castor/io/StreamListPrivilegesCnv.hpp index 3c69ea633151a4b4e8371644c95c50cfe57ea7f8..a5b41cc21e4999977882fbbb52fd7ac83c1e11cb 100644 --- a/castor/io/StreamListPrivilegesCnv.hpp +++ b/castor/io/StreamListPrivilegesCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamListPrivilegesCnv diff --git a/castor/io/StreamListPrivilegesResponseCnv.cpp b/castor/io/StreamListPrivilegesResponseCnv.cpp index 0a8f327d70c73872a838128b40847424848576e3..80ef3c9cdee0d1a1103e118d6f05673bffcfe3a4 100644 --- a/castor/io/StreamListPrivilegesResponseCnv.cpp +++ b/castor/io/StreamListPrivilegesResponseCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamListPrivilegesResponseCnv::createRep(castor::IAddress* ad castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivilegesResponse* obj = dynamic_cast<castor::bwlist::ListPrivilegesResponse*>(object); StreamAddress* ad = @@ -96,7 +96,7 @@ void castor::io::StreamListPrivilegesResponseCnv::createRep(castor::IAddress* ad // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamListPrivilegesResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -123,7 +123,7 @@ castor::IObject* castor::io::StreamListPrivilegesResponseCnv::createObj(castor:: void castor::io::StreamListPrivilegesResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivilegesResponse* obj = dynamic_cast<castor::bwlist::ListPrivilegesResponse*>(object); if (0 == obj) { @@ -151,7 +151,7 @@ void castor::io::StreamListPrivilegesResponseCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamListPrivilegesResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamListPrivilegesResponseCnv.hpp b/castor/io/StreamListPrivilegesResponseCnv.hpp index 88bc4d26058761864413be5cf877a7f7a451e9b2..d23c6b94c28dd9d525ca5e5f0e1c8d3323864884 100644 --- a/castor/io/StreamListPrivilegesResponseCnv.hpp +++ b/castor/io/StreamListPrivilegesResponseCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamListPrivilegesResponseCnv diff --git a/castor/io/StreamMessageAckCnv.cpp b/castor/io/StreamMessageAckCnv.cpp index 17f826a1d8d16cb40b4fb90e7de24e48886d13f7..f1c0b7b69e6c253d34b904e62ff876aca5b2be87 100644 --- a/castor/io/StreamMessageAckCnv.cpp +++ b/castor/io/StreamMessageAckCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamMessageAckCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::MessageAck* obj = dynamic_cast<castor::MessageAck*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamMessageAckCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamMessageAckCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -125,7 +125,7 @@ castor::IObject* castor::io::StreamMessageAckCnv::createObj(castor::IAddress* ad void castor::io::StreamMessageAckCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::MessageAck* obj = dynamic_cast<castor::MessageAck*>(object); if (0 == obj) { @@ -147,7 +147,7 @@ void castor::io::StreamMessageAckCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamMessageAckCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamMessageAckCnv.hpp b/castor/io/StreamMessageAckCnv.hpp index 87a41dad6a608413a55f9254bbe2e300bd5ce0e7..6bb920050a7678a29ac3a16ef5d5d6512fcd5994 100644 --- a/castor/io/StreamMessageAckCnv.hpp +++ b/castor/io/StreamMessageAckCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamMessageAckCnv diff --git a/castor/io/StreamMoverCloseRequestCnv.cpp b/castor/io/StreamMoverCloseRequestCnv.cpp index df2d2293543680ced0fc5e5bf668c6790d1746e3..54a408b4f9ae138328fa476bc7e9886c3c4669ff 100644 --- a/castor/io/StreamMoverCloseRequestCnv.cpp +++ b/castor/io/StreamMoverCloseRequestCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamMoverCloseRequestCnv::createRep(castor::IAddress* address castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); StreamAddress* ad = @@ -113,7 +113,7 @@ void castor::io::StreamMoverCloseRequestCnv::createRep(castor::IAddress* address // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamMoverCloseRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -189,7 +189,7 @@ castor::IObject* castor::io::StreamMoverCloseRequestCnv::createObj(castor::IAddr void castor::io::StreamMoverCloseRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::MoverCloseRequest* obj = dynamic_cast<castor::stager::MoverCloseRequest*>(object); if (0 == obj) { @@ -213,7 +213,7 @@ void castor::io::StreamMoverCloseRequestCnv::marshalObject(castor::IObject* obje //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamMoverCloseRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamMoverCloseRequestCnv.hpp b/castor/io/StreamMoverCloseRequestCnv.hpp index dcd3d3eebc6de800f7238ddd63669856553260f7..49d1f81e6462aad908525e97a3e50eafa81c282c 100644 --- a/castor/io/StreamMoverCloseRequestCnv.hpp +++ b/castor/io/StreamMoverCloseRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamMoverCloseRequestCnv diff --git a/castor/io/StreamNoMoreFilesCnv.cpp b/castor/io/StreamNoMoreFilesCnv.cpp index 62107c881dc1356183a22aa1a2b6c4b797207333..82551e4c1c44d23d98207cba025eb08462e55a15 100644 --- a/castor/io/StreamNoMoreFilesCnv.cpp +++ b/castor/io/StreamNoMoreFilesCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamNoMoreFilesCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::NoMoreFiles* obj = dynamic_cast<castor::tape::tapegateway::NoMoreFiles*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamNoMoreFilesCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNoMoreFilesCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamNoMoreFilesCnv::createObj(castor::IAddress* a void castor::io::StreamNoMoreFilesCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::NoMoreFiles* obj = dynamic_cast<castor::tape::tapegateway::NoMoreFiles*>(object); if (0 == obj) { @@ -138,7 +138,7 @@ void castor::io::StreamNoMoreFilesCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNoMoreFilesCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamNoMoreFilesCnv.hpp b/castor/io/StreamNoMoreFilesCnv.hpp index ab89064fe5170a338ec8099aff8ca634db120383..49ba14dc2a902449c8929769a79da1c0e5fbc470 100644 --- a/castor/io/StreamNoMoreFilesCnv.hpp +++ b/castor/io/StreamNoMoreFilesCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamNoMoreFilesCnv diff --git a/castor/io/StreamNotificationAcknowledgeCnv.cpp b/castor/io/StreamNotificationAcknowledgeCnv.cpp index 718a9e8dee78014d00e1385cdb5e51a0bd3261f5..67216d6e13353d100568e78a17cc826bdf75b700 100644 --- a/castor/io/StreamNotificationAcknowledgeCnv.cpp +++ b/castor/io/StreamNotificationAcknowledgeCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamNotificationAcknowledgeCnv::createRep(castor::IAddress* a castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::NotificationAcknowledge* obj = dynamic_cast<castor::tape::tapegateway::NotificationAcknowledge*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamNotificationAcknowledgeCnv::createRep(castor::IAddress* a // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNotificationAcknowledgeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamNotificationAcknowledgeCnv::createObj(castor: void castor::io::StreamNotificationAcknowledgeCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::NotificationAcknowledge* obj = dynamic_cast<castor::tape::tapegateway::NotificationAcknowledge*>(object); if (0 == obj) { @@ -138,7 +138,7 @@ void castor::io::StreamNotificationAcknowledgeCnv::marshalObject(castor::IObject //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNotificationAcknowledgeCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamNotificationAcknowledgeCnv.hpp b/castor/io/StreamNotificationAcknowledgeCnv.hpp index 634ce14feb08b6646405479f28987acdacbdd373..cd74404e52d57e67a825fb036bd4ccddeeb22d80 100644 --- a/castor/io/StreamNotificationAcknowledgeCnv.hpp +++ b/castor/io/StreamNotificationAcknowledgeCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamNotificationAcknowledgeCnv diff --git a/castor/io/StreamNsFileIdCnv.cpp b/castor/io/StreamNsFileIdCnv.cpp index a22e751dd47d3061b442edbf90326484a9be5001..391f2f065090bad65bf7c868472a6d038e1f5d23 100644 --- a/castor/io/StreamNsFileIdCnv.cpp +++ b/castor/io/StreamNsFileIdCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamNsFileIdCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamNsFileIdCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNsFileIdCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -118,7 +118,7 @@ castor::IObject* castor::io::StreamNsFileIdCnv::createObj(castor::IAddress* addr void castor::io::StreamNsFileIdCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::NsFileId* obj = dynamic_cast<castor::stager::NsFileId*>(object); if (0 == obj) { @@ -141,7 +141,7 @@ void castor::io::StreamNsFileIdCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNsFileIdCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamNsFileIdCnv.hpp b/castor/io/StreamNsFileIdCnv.hpp index b5d88b5c1138f7f5ffaac024f389ccee1348188e..7e572939501423aba2318a63166cce672ae3d5af 100644 --- a/castor/io/StreamNsFileIdCnv.hpp +++ b/castor/io/StreamNsFileIdCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamNsFileIdCnv diff --git a/castor/io/StreamNsFilesDeletedCnv.cpp b/castor/io/StreamNsFilesDeletedCnv.cpp index 3ae51475af451ea34adee9d66a389687704baf16..f9780d2515b383c3562fb207cdda9bcbee29c68e 100644 --- a/castor/io/StreamNsFilesDeletedCnv.cpp +++ b/castor/io/StreamNsFilesDeletedCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamNsFilesDeletedCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamNsFilesDeletedCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNsFilesDeletedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -167,7 +167,7 @@ castor::IObject* castor::io::StreamNsFilesDeletedCnv::createObj(castor::IAddress void castor::io::StreamNsFilesDeletedCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeleted* obj = dynamic_cast<castor::stager::NsFilesDeleted*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamNsFilesDeletedCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNsFilesDeletedCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamNsFilesDeletedCnv.hpp b/castor/io/StreamNsFilesDeletedCnv.hpp index 7168ace74ccc98f40bf7469e81dd91582b871e51..de9a98368fe1c979cadbca685a4e80e76b6fd808 100644 --- a/castor/io/StreamNsFilesDeletedCnv.hpp +++ b/castor/io/StreamNsFilesDeletedCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamNsFilesDeletedCnv diff --git a/castor/io/StreamNsFilesDeletedResponseCnv.cpp b/castor/io/StreamNsFilesDeletedResponseCnv.cpp index fe120d8b416ba20a408dd880e2935b2e49202d75..bc8456474e860a899ede041c2aadee66eb1ffdf6 100644 --- a/castor/io/StreamNsFilesDeletedResponseCnv.cpp +++ b/castor/io/StreamNsFilesDeletedResponseCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamNsFilesDeletedResponseCnv::createRep(castor::IAddress* ad castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeletedResponse* obj = dynamic_cast<castor::stager::NsFilesDeletedResponse*>(object); StreamAddress* ad = @@ -96,7 +96,7 @@ void castor::io::StreamNsFilesDeletedResponseCnv::createRep(castor::IAddress* ad // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNsFilesDeletedResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -123,7 +123,7 @@ castor::IObject* castor::io::StreamNsFilesDeletedResponseCnv::createObj(castor:: void castor::io::StreamNsFilesDeletedResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::NsFilesDeletedResponse* obj = dynamic_cast<castor::stager::NsFilesDeletedResponse*>(object); if (0 == obj) { @@ -151,7 +151,7 @@ void castor::io::StreamNsFilesDeletedResponseCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamNsFilesDeletedResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamNsFilesDeletedResponseCnv.hpp b/castor/io/StreamNsFilesDeletedResponseCnv.hpp index d3f2fc40f8a8bd7483bb875be7124f2dfa6b5009..1f7b8d9100c436f94776ff0cbf9beafe20d964da 100644 --- a/castor/io/StreamNsFilesDeletedResponseCnv.hpp +++ b/castor/io/StreamNsFilesDeletedResponseCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamNsFilesDeletedResponseCnv diff --git a/castor/io/StreamPingNotificationCnv.cpp b/castor/io/StreamPingNotificationCnv.cpp index 5dc4e35d92f15ea3e71fe19bb674c6a3ae1792af..81a4e2194125cbf27efe96b23de4c2cbb0592093 100644 --- a/castor/io/StreamPingNotificationCnv.cpp +++ b/castor/io/StreamPingNotificationCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamPingNotificationCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::PingNotification* obj = dynamic_cast<castor::tape::tapegateway::PingNotification*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamPingNotificationCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPingNotificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamPingNotificationCnv::createObj(castor::IAddre void castor::io::StreamPingNotificationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::PingNotification* obj = dynamic_cast<castor::tape::tapegateway::PingNotification*>(object); if (0 == obj) { @@ -138,7 +138,7 @@ void castor::io::StreamPingNotificationCnv::marshalObject(castor::IObject* objec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPingNotificationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamPingNotificationCnv.hpp b/castor/io/StreamPingNotificationCnv.hpp index 76472e6204778bee6d97217ccb7aeb459d98d40e..b4a191af0be6f6a3a5f8bfe2e7b8517a8dc0ebe0 100644 --- a/castor/io/StreamPingNotificationCnv.hpp +++ b/castor/io/StreamPingNotificationCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamPingNotificationCnv diff --git a/castor/io/StreamPrivilegeCnv.cpp b/castor/io/StreamPrivilegeCnv.cpp index 522451a2e973011b311337b7bdc52219762c99d4..508c43201c00ab2b70b4325f0ee054010abddfad 100644 --- a/castor/io/StreamPrivilegeCnv.cpp +++ b/castor/io/StreamPrivilegeCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamPrivilegeCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::bwlist::Privilege* obj = dynamic_cast<castor::bwlist::Privilege*>(object); StreamAddress* ad = @@ -97,7 +97,7 @@ void castor::io::StreamPrivilegeCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPrivilegeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -130,7 +130,7 @@ castor::IObject* castor::io::StreamPrivilegeCnv::createObj(castor::IAddress* add void castor::io::StreamPrivilegeCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::bwlist::Privilege* obj = dynamic_cast<castor::bwlist::Privilege*>(object); if (0 == obj) { @@ -153,7 +153,7 @@ void castor::io::StreamPrivilegeCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPrivilegeCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamPrivilegeCnv.hpp b/castor/io/StreamPrivilegeCnv.hpp index 38477ad94fb9f088923323994efb1fbc6c2ff106..cd3135ada0adfbe2979fab0de416daab6d73109c 100644 --- a/castor/io/StreamPrivilegeCnv.hpp +++ b/castor/io/StreamPrivilegeCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamPrivilegeCnv diff --git a/castor/io/StreamPtrCnv.cpp b/castor/io/StreamPtrCnv.cpp index f12cdb670db2d01e4b61b41a063050827488a8d8..c423b9a4030902110716eb9b8c371734e27f759f 100644 --- a/castor/io/StreamPtrCnv.cpp +++ b/castor/io/StreamPtrCnv.cpp @@ -75,7 +75,7 @@ void castor::io::StreamPtrCnv::createRep(castor::IAddress*, castor::IObject*, bool, unsigned int) - throw (castor::exception::Exception) { + { // This is normally never called, so just raise an exception castor::exception::Exception ex; ex.getMessage() << "castor::io::StreamPtrCnv::createRep " @@ -88,7 +88,7 @@ void castor::io::StreamPtrCnv::createRep(castor::IAddress*, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPtrCnv::createObj (castor::IAddress*) - throw (castor::exception::Exception) { + { castor::exception::Exception ex; ex.getMessage() << "castor::io::StreamPtrCnv::createObj " << "should never be called"; @@ -101,7 +101,7 @@ castor::IObject* castor::io::StreamPtrCnv::createObj void castor::io::StreamPtrCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet&) - throw (castor::exception::Exception) { + { if (0 != object) { // This is normally never called, so just raise an exception castor::exception::Exception ex; @@ -118,7 +118,7 @@ void castor::io::StreamPtrCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPtrCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", SVC_STREAMCNV); // Just retrieve the object from the newlyCreated catalog // using the id stored in the stream diff --git a/castor/io/StreamPtrCnv.hpp b/castor/io/StreamPtrCnv.hpp index 27f0db5233c8c4f7e6f771bc83b0dc2282e1955b..73491143bac38b168519109612be78c58d679d37 100644 --- a/castor/io/StreamPtrCnv.hpp +++ b/castor/io/StreamPtrCnv.hpp @@ -88,7 +88,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -100,7 +100,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -114,7 +114,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -128,7 +128,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamFileCnv diff --git a/castor/io/StreamPutFailedCnv.cpp b/castor/io/StreamPutFailedCnv.cpp index cf5059c1827a1d2dd2c1147704f3bead500df1ce..7fe539a7a1dbe4285f32eb3e0fe607f67eebd863 100644 --- a/castor/io/StreamPutFailedCnv.cpp +++ b/castor/io/StreamPutFailedCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamPutFailedCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamPutFailedCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPutFailedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -173,7 +173,7 @@ castor::IObject* castor::io::StreamPutFailedCnv::createObj(castor::IAddress* add void castor::io::StreamPutFailedCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::PutFailed* obj = dynamic_cast<castor::stager::PutFailed*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamPutFailedCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPutFailedCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamPutFailedCnv.hpp b/castor/io/StreamPutFailedCnv.hpp index 68030dd80be6d30dbf75fb33898a6f1c4c1c0770..3649fa53b5814f795191acb4586748f097092db8 100644 --- a/castor/io/StreamPutFailedCnv.hpp +++ b/castor/io/StreamPutFailedCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamPutFailedCnv diff --git a/castor/io/StreamPutStartRequestCnv.cpp b/castor/io/StreamPutStartRequestCnv.cpp index 8900c80be9caa9d0a8db2db1ff9af5dd230fa695..e5225addbba3f938f0bd7d2c999ecf53d037979e 100644 --- a/castor/io/StreamPutStartRequestCnv.cpp +++ b/castor/io/StreamPutStartRequestCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamPutStartRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); StreamAddress* ad = @@ -111,7 +111,7 @@ void castor::io::StreamPutStartRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPutStartRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -181,7 +181,7 @@ castor::IObject* castor::io::StreamPutStartRequestCnv::createObj(castor::IAddres void castor::io::StreamPutStartRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::PutStartRequest* obj = dynamic_cast<castor::stager::PutStartRequest*>(object); if (0 == obj) { @@ -205,7 +205,7 @@ void castor::io::StreamPutStartRequestCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamPutStartRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamPutStartRequestCnv.hpp b/castor/io/StreamPutStartRequestCnv.hpp index fd4d00193792757c6f2ea9d46cdc829f7d02b0a4..f279ab446e664c57667b50512d7715ef9810019c 100644 --- a/castor/io/StreamPutStartRequestCnv.hpp +++ b/castor/io/StreamPutStartRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamPutStartRequestCnv diff --git a/castor/io/StreamQueryParameterCnv.cpp b/castor/io/StreamQueryParameterCnv.cpp index 844ca9d567e75a7b04a10b68e9994f160ec20b8b..81fbc4e3ef0082d298662a5a9d67ca253c37d4e9 100644 --- a/castor/io/StreamQueryParameterCnv.cpp +++ b/castor/io/StreamQueryParameterCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamQueryParameterCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamQueryParameterCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamQueryParameterCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -119,7 +119,7 @@ castor::IObject* castor::io::StreamQueryParameterCnv::createObj(castor::IAddress void castor::io::StreamQueryParameterCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::QueryParameter* obj = dynamic_cast<castor::stager::QueryParameter*>(object); if (0 == obj) { @@ -142,7 +142,7 @@ void castor::io::StreamQueryParameterCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamQueryParameterCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamQueryParameterCnv.hpp b/castor/io/StreamQueryParameterCnv.hpp index 2fbd9b2b4f8440b220de56c9790ad4f9f87e175f..8fe529e195afe0cdaa39773572fc57d8ca100144 100644 --- a/castor/io/StreamQueryParameterCnv.hpp +++ b/castor/io/StreamQueryParameterCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamQueryParameterCnv diff --git a/castor/io/StreamRequestTypeCnv.cpp b/castor/io/StreamRequestTypeCnv.cpp index 291e805e925ee3b411db2475caa175bcebc582ec..8da5c8ec5b0325ab9947027e4d81919b759a2571 100644 --- a/castor/io/StreamRequestTypeCnv.cpp +++ b/castor/io/StreamRequestTypeCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamRequestTypeCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamRequestTypeCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamRequestTypeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -113,7 +113,7 @@ castor::IObject* castor::io::StreamRequestTypeCnv::createObj(castor::IAddress* a void castor::io::StreamRequestTypeCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::bwlist::RequestType* obj = dynamic_cast<castor::bwlist::RequestType*>(object); if (0 == obj) { @@ -136,7 +136,7 @@ void castor::io::StreamRequestTypeCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamRequestTypeCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamRequestTypeCnv.hpp b/castor/io/StreamRequestTypeCnv.hpp index d81573ae88adf3b21cd7f786243c648d530a930d..8e7d44022e1b1fbe625b36443ad9f684f4fcfa06 100644 --- a/castor/io/StreamRequestTypeCnv.hpp +++ b/castor/io/StreamRequestTypeCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamRequestTypeCnv diff --git a/castor/io/StreamSetFileGCWeightCnv.cpp b/castor/io/StreamSetFileGCWeightCnv.cpp index fa97114fda22748fe627de08038556d67a9eb870..b34de4c9764eaa5afced99cecb7c3a31584c655d 100644 --- a/castor/io/StreamSetFileGCWeightCnv.cpp +++ b/castor/io/StreamSetFileGCWeightCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamSetFileGCWeightCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamSetFileGCWeightCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamSetFileGCWeightCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -167,7 +167,7 @@ castor::IObject* castor::io::StreamSetFileGCWeightCnv::createObj(castor::IAddres void castor::io::StreamSetFileGCWeightCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::SetFileGCWeight* obj = dynamic_cast<castor::stager::SetFileGCWeight*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamSetFileGCWeightCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamSetFileGCWeightCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamSetFileGCWeightCnv.hpp b/castor/io/StreamSetFileGCWeightCnv.hpp index 839948297806123ac2a37b237513c7031129ac9a..1b7b27a0c09b967cb373dee4661703cb7f82899d 100644 --- a/castor/io/StreamSetFileGCWeightCnv.hpp +++ b/castor/io/StreamSetFileGCWeightCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamSetFileGCWeightCnv diff --git a/castor/io/StreamStageAbortRequestCnv.cpp b/castor/io/StreamStageAbortRequestCnv.cpp index e89104af0cb7a88ee521bf7b9d621e2a2bffe8b5..bc991e451ac6c4f2e32de2c920016fb588d3dddd 100644 --- a/castor/io/StreamStageAbortRequestCnv.cpp +++ b/castor/io/StreamStageAbortRequestCnv.cpp @@ -84,7 +84,7 @@ void castor::io::StreamStageAbortRequestCnv::createRep(castor::IAddress* address castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); StreamAddress* ad = @@ -110,7 +110,7 @@ void castor::io::StreamStageAbortRequestCnv::createRep(castor::IAddress* address // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageAbortRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -168,7 +168,7 @@ castor::IObject* castor::io::StreamStageAbortRequestCnv::createObj(castor::IAddr void castor::io::StreamStageAbortRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StageAbortRequest* obj = dynamic_cast<castor::stager::StageAbortRequest*>(object); if (0 == obj) { @@ -199,7 +199,7 @@ void castor::io::StreamStageAbortRequestCnv::marshalObject(castor::IObject* obje //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageAbortRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStageAbortRequestCnv.hpp b/castor/io/StreamStageAbortRequestCnv.hpp index d89094c7f5838e9a0c26ba193e25bd73f0851ddf..4d10704eb3bea86e8cfbe3eae2ae6ee7327add8f 100644 --- a/castor/io/StreamStageAbortRequestCnv.hpp +++ b/castor/io/StreamStageAbortRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStageAbortRequestCnv diff --git a/castor/io/StreamStageFileQueryRequestCnv.cpp b/castor/io/StreamStageFileQueryRequestCnv.cpp index ff7920fac447e460a7b946d3358bbb2a16847fa9..6d23a0a77f6fd6ef2edbf1c0da15105aaa18aa73 100644 --- a/castor/io/StreamStageFileQueryRequestCnv.cpp +++ b/castor/io/StreamStageFileQueryRequestCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStageFileQueryRequestCnv::createRep(castor::IAddress* add castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamStageFileQueryRequestCnv::createRep(castor::IAddress* add // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageFileQueryRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -167,7 +167,7 @@ castor::IObject* castor::io::StreamStageFileQueryRequestCnv::createObj(castor::I void castor::io::StreamStageFileQueryRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StageFileQueryRequest* obj = dynamic_cast<castor::stager::StageFileQueryRequest*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamStageFileQueryRequestCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageFileQueryRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStageFileQueryRequestCnv.hpp b/castor/io/StreamStageFileQueryRequestCnv.hpp index d7e4f4af70ffd924f81ff2ec75155d7d2b6b78b3..cc5b888a97068fa4dbedc4bbef927faa52da1219 100644 --- a/castor/io/StreamStageFileQueryRequestCnv.hpp +++ b/castor/io/StreamStageFileQueryRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStageFileQueryRequestCnv diff --git a/castor/io/StreamStageGetRequestCnv.cpp b/castor/io/StreamStageGetRequestCnv.cpp index 94fdf9f50dc0c1454b541918e95ef5858eac68a1..0d1881d37a0615af0c4be97f6c9e55af92307785 100644 --- a/castor/io/StreamStageGetRequestCnv.cpp +++ b/castor/io/StreamStageGetRequestCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStageGetRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamStageGetRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageGetRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamStageGetRequestCnv::createObj(castor::IAddres void castor::io::StreamStageGetRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StageGetRequest* obj = dynamic_cast<castor::stager::StageGetRequest*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamStageGetRequestCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageGetRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStageGetRequestCnv.hpp b/castor/io/StreamStageGetRequestCnv.hpp index 033d1d4afb75659b42d3392a7cb95dca77102e7f..bb608c41e7e467f85783099dfbdcb51a49102df2 100644 --- a/castor/io/StreamStageGetRequestCnv.hpp +++ b/castor/io/StreamStageGetRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStageGetRequestCnv diff --git a/castor/io/StreamStagePrepareToGetRequestCnv.cpp b/castor/io/StreamStagePrepareToGetRequestCnv.cpp index d12f275bb964bd0a9cc8976c2529951f02201a31..c5cca047baa5fe6bcb6fce5c8785867dd4090184 100644 --- a/castor/io/StreamStagePrepareToGetRequestCnv.cpp +++ b/castor/io/StreamStagePrepareToGetRequestCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStagePrepareToGetRequestCnv::createRep(castor::IAddress* castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamStagePrepareToGetRequestCnv::createRep(castor::IAddress* // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePrepareToGetRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamStagePrepareToGetRequestCnv::createObj(castor void castor::io::StreamStagePrepareToGetRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToGetRequest* obj = dynamic_cast<castor::stager::StagePrepareToGetRequest*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamStagePrepareToGetRequestCnv::marshalObject(castor::IObjec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePrepareToGetRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStagePrepareToGetRequestCnv.hpp b/castor/io/StreamStagePrepareToGetRequestCnv.hpp index 230de3402dc017c4cc175886eb2f15bdf7299935..01589702d9077a8660a93490b1837ba5dcb8c5c1 100644 --- a/castor/io/StreamStagePrepareToGetRequestCnv.hpp +++ b/castor/io/StreamStagePrepareToGetRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStagePrepareToGetRequestCnv diff --git a/castor/io/StreamStagePrepareToPutRequestCnv.cpp b/castor/io/StreamStagePrepareToPutRequestCnv.cpp index 983191124e6fab4fd1801e6e0b0a15badf68cb58..5eff5169522dce583989ba63e7a7afa69fd00a6f 100644 --- a/castor/io/StreamStagePrepareToPutRequestCnv.cpp +++ b/castor/io/StreamStagePrepareToPutRequestCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStagePrepareToPutRequestCnv::createRep(castor::IAddress* castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamStagePrepareToPutRequestCnv::createRep(castor::IAddress* // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePrepareToPutRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamStagePrepareToPutRequestCnv::createObj(castor void castor::io::StreamStagePrepareToPutRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StagePrepareToPutRequest* obj = dynamic_cast<castor::stager::StagePrepareToPutRequest*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamStagePrepareToPutRequestCnv::marshalObject(castor::IObjec //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePrepareToPutRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStagePrepareToPutRequestCnv.hpp b/castor/io/StreamStagePrepareToPutRequestCnv.hpp index b20e9fc149cbdf4de4c1ae040f94cb0577f132c3..186797a41ece6d8a22375043b5ffb633407eb92b 100644 --- a/castor/io/StreamStagePrepareToPutRequestCnv.hpp +++ b/castor/io/StreamStagePrepareToPutRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStagePrepareToPutRequestCnv diff --git a/castor/io/StreamStagePutDoneRequestCnv.cpp b/castor/io/StreamStagePutDoneRequestCnv.cpp index 7040381674b9734cf45b72322ba4538492b2dc6b..25ead64ee07ca02ce871c35331591f25fd14562f 100644 --- a/castor/io/StreamStagePutDoneRequestCnv.cpp +++ b/castor/io/StreamStagePutDoneRequestCnv.cpp @@ -84,7 +84,7 @@ void castor::io::StreamStagePutDoneRequestCnv::createRep(castor::IAddress* addre castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); StreamAddress* ad = @@ -110,7 +110,7 @@ void castor::io::StreamStagePutDoneRequestCnv::createRep(castor::IAddress* addre // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePutDoneRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -168,7 +168,7 @@ castor::IObject* castor::io::StreamStagePutDoneRequestCnv::createObj(castor::IAd void castor::io::StreamStagePutDoneRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StagePutDoneRequest* obj = dynamic_cast<castor::stager::StagePutDoneRequest*>(object); if (0 == obj) { @@ -199,7 +199,7 @@ void castor::io::StreamStagePutDoneRequestCnv::marshalObject(castor::IObject* ob //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePutDoneRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStagePutDoneRequestCnv.hpp b/castor/io/StreamStagePutDoneRequestCnv.hpp index 3e3893be047f5d618be33b7d64d4d785aa302f07..d4024eb412bf641607fa8aa885a69e44e4cb1112 100644 --- a/castor/io/StreamStagePutDoneRequestCnv.hpp +++ b/castor/io/StreamStagePutDoneRequestCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStagePutDoneRequestCnv diff --git a/castor/io/StreamStagePutRequestCnv.cpp b/castor/io/StreamStagePutRequestCnv.cpp index ae9a36fcd73b993bbe7e2c1e24ee938949198542..dbe6dd6e5a0e8dfea3c2679fdf3ca9249685e74e 100644 --- a/castor/io/StreamStagePutRequestCnv.cpp +++ b/castor/io/StreamStagePutRequestCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStagePutRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamStagePutRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePutRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamStagePutRequestCnv::createObj(castor::IAddres void castor::io::StreamStagePutRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StagePutRequest* obj = dynamic_cast<castor::stager::StagePutRequest*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamStagePutRequestCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStagePutRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStagePutRequestCnv.hpp b/castor/io/StreamStagePutRequestCnv.hpp index 2bab66d483556f91de80784e7797b88c3b665337..6827407b56d8639996d5b7abb095f30dc6258835 100644 --- a/castor/io/StreamStagePutRequestCnv.hpp +++ b/castor/io/StreamStagePutRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStagePutRequestCnv diff --git a/castor/io/StreamStageRmRequestCnv.cpp b/castor/io/StreamStageRmRequestCnv.cpp index d6f9576653f104be752ee14e2f470e12b76b83c3..08e87c8ce862d4100ebba972260b7f40a5824044 100644 --- a/castor/io/StreamStageRmRequestCnv.cpp +++ b/castor/io/StreamStageRmRequestCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStageRmRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamStageRmRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageRmRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamStageRmRequestCnv::createObj(castor::IAddress void castor::io::StreamStageRmRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StageRmRequest* obj = dynamic_cast<castor::stager::StageRmRequest*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamStageRmRequestCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStageRmRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStageRmRequestCnv.hpp b/castor/io/StreamStageRmRequestCnv.hpp index 67d293cafc69db42c8f0553e32763b4ea2a99b3d..fe9eaad4af1e1fcab89787028217c9c579bdf0b5 100644 --- a/castor/io/StreamStageRmRequestCnv.hpp +++ b/castor/io/StreamStageRmRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStageRmRequestCnv diff --git a/castor/io/StreamStartResponseCnv.cpp b/castor/io/StreamStartResponseCnv.cpp index 5ca2656cf09597345c928aa26a6ed397d6e293e3..faf17cf7a5c22c6a59710e80bd9b08de42dd8c3d 100644 --- a/castor/io/StreamStartResponseCnv.cpp +++ b/castor/io/StreamStartResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamStartResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::StartResponse* obj = dynamic_cast<castor::rh::StartResponse*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamStartResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStartResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -125,7 +125,7 @@ castor::IObject* castor::io::StreamStartResponseCnv::createObj(castor::IAddress* void castor::io::StreamStartResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::StartResponse* obj = dynamic_cast<castor::rh::StartResponse*>(object); if (0 == obj) { @@ -147,7 +147,7 @@ void castor::io::StreamStartResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStartResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStartResponseCnv.hpp b/castor/io/StreamStartResponseCnv.hpp index c1c25b644218c6cf90a4b0e8eb6758be65058dd6..1352648d7f45cdb370c71b5209c1a8dc59bec39a 100644 --- a/castor/io/StreamStartResponseCnv.hpp +++ b/castor/io/StreamStartResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStartResponseCnv diff --git a/castor/io/StreamStgFilesDeletedCnv.cpp b/castor/io/StreamStgFilesDeletedCnv.cpp index 2ff15641c407eecac9875ab930cac37d0e7fd8ca..48fbbb678c114252bed4279aacab71850ed0a5d0 100644 --- a/castor/io/StreamStgFilesDeletedCnv.cpp +++ b/castor/io/StreamStgFilesDeletedCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamStgFilesDeletedCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); StreamAddress* ad = @@ -109,7 +109,7 @@ void castor::io::StreamStgFilesDeletedCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStgFilesDeletedCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -167,7 +167,7 @@ castor::IObject* castor::io::StreamStgFilesDeletedCnv::createObj(castor::IAddres void castor::io::StreamStgFilesDeletedCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeleted* obj = dynamic_cast<castor::stager::StgFilesDeleted*>(object); if (0 == obj) { @@ -197,7 +197,7 @@ void castor::io::StreamStgFilesDeletedCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStgFilesDeletedCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStgFilesDeletedCnv.hpp b/castor/io/StreamStgFilesDeletedCnv.hpp index e01937303c87a9131c4e78406fd86d798053d4c1..7466dde2171f8472f0eb1264abdef7f578cd9aff 100644 --- a/castor/io/StreamStgFilesDeletedCnv.hpp +++ b/castor/io/StreamStgFilesDeletedCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStgFilesDeletedCnv diff --git a/castor/io/StreamStgFilesDeletedResponseCnv.cpp b/castor/io/StreamStgFilesDeletedResponseCnv.cpp index 124405e8463629d3ab2da5112e90cbaa87ce539b..ca2710a422d8adeaebc0d80d6e9f02ba2f788aa5 100644 --- a/castor/io/StreamStgFilesDeletedResponseCnv.cpp +++ b/castor/io/StreamStgFilesDeletedResponseCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamStgFilesDeletedResponseCnv::createRep(castor::IAddress* a castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeletedResponse* obj = dynamic_cast<castor::stager::StgFilesDeletedResponse*>(object); StreamAddress* ad = @@ -96,7 +96,7 @@ void castor::io::StreamStgFilesDeletedResponseCnv::createRep(castor::IAddress* a // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStgFilesDeletedResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -123,7 +123,7 @@ castor::IObject* castor::io::StreamStgFilesDeletedResponseCnv::createObj(castor: void castor::io::StreamStgFilesDeletedResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::StgFilesDeletedResponse* obj = dynamic_cast<castor::stager::StgFilesDeletedResponse*>(object); if (0 == obj) { @@ -151,7 +151,7 @@ void castor::io::StreamStgFilesDeletedResponseCnv::marshalObject(castor::IObject //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStgFilesDeletedResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStgFilesDeletedResponseCnv.hpp b/castor/io/StreamStgFilesDeletedResponseCnv.hpp index 6a21e0e4d5af803e40d877c0da07b103cc4ecc7e..782d39a0d947cd34ffb9149ffc9065a2d4eb2b79 100644 --- a/castor/io/StreamStgFilesDeletedResponseCnv.hpp +++ b/castor/io/StreamStgFilesDeletedResponseCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStgFilesDeletedResponseCnv diff --git a/castor/io/StreamStringResponseCnv.cpp b/castor/io/StreamStringResponseCnv.cpp index 7addd31b93c5827934012e340b4dd0cf7038368a..cefd62d4914d9183fd62940795aa5553d54ecb92 100644 --- a/castor/io/StreamStringResponseCnv.cpp +++ b/castor/io/StreamStringResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamStringResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::rh::StringResponse* obj = dynamic_cast<castor::rh::StringResponse*>(object); StreamAddress* ad = @@ -95,7 +95,7 @@ void castor::io::StreamStringResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStringResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -125,7 +125,7 @@ castor::IObject* castor::io::StreamStringResponseCnv::createObj(castor::IAddress void castor::io::StreamStringResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::rh::StringResponse* obj = dynamic_cast<castor::rh::StringResponse*>(object); if (0 == obj) { @@ -147,7 +147,7 @@ void castor::io::StreamStringResponseCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamStringResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamStringResponseCnv.hpp b/castor/io/StreamStringResponseCnv.hpp index 553fb27cd9810187ca624fa5ec6c6dfc0fd0011a..15faa33cba3de45025c9eac77360e8ed018249d9 100644 --- a/castor/io/StreamStringResponseCnv.hpp +++ b/castor/io/StreamStringResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamStringResponseCnv diff --git a/castor/io/StreamSubRequestCnv.cpp b/castor/io/StreamSubRequestCnv.cpp index 67004b94a5f9564e9e24f541b7fc0447c6038466..66e637ce284ec36082f3f865d33a0d25f6a1102e 100644 --- a/castor/io/StreamSubRequestCnv.cpp +++ b/castor/io/StreamSubRequestCnv.cpp @@ -82,7 +82,7 @@ void castor::io::StreamSubRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); StreamAddress* ad = @@ -107,7 +107,7 @@ void castor::io::StreamSubRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamSubRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -162,7 +162,7 @@ castor::IObject* castor::io::StreamSubRequestCnv::createObj(castor::IAddress* ad void castor::io::StreamSubRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::stager::SubRequest* obj = dynamic_cast<castor::stager::SubRequest*>(object); if (0 == obj) { @@ -190,7 +190,7 @@ void castor::io::StreamSubRequestCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamSubRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamSubRequestCnv.hpp b/castor/io/StreamSubRequestCnv.hpp index 8b575f43335b115b23fc36e9ac01b5215c215aed..c0fb4ff46d819576abe4aa05c6d4aaeb6c6c7749 100644 --- a/castor/io/StreamSubRequestCnv.hpp +++ b/castor/io/StreamSubRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamSubRequestCnv diff --git a/castor/io/StreamTapeAccessSpecificationCnv.cpp b/castor/io/StreamTapeAccessSpecificationCnv.cpp index 3a294f74cf49765805f6bc91a9aa526df7878d51..476fd31c68e27c9dc5bf2745e41018fe688921c9 100644 --- a/castor/io/StreamTapeAccessSpecificationCnv.cpp +++ b/castor/io/StreamTapeAccessSpecificationCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamTapeAccessSpecificationCnv::createRep(castor::IAddress* a castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamTapeAccessSpecificationCnv::createRep(castor::IAddress* a // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeAccessSpecificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -121,7 +121,7 @@ castor::IObject* castor::io::StreamTapeAccessSpecificationCnv::createObj(castor: void castor::io::StreamTapeAccessSpecificationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::TapeAccessSpecification* obj = dynamic_cast<castor::vdqm::TapeAccessSpecification*>(object); if (0 == obj) { @@ -143,7 +143,7 @@ void castor::io::StreamTapeAccessSpecificationCnv::marshalObject(castor::IObject //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeAccessSpecificationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamTapeAccessSpecificationCnv.hpp b/castor/io/StreamTapeAccessSpecificationCnv.hpp index b1c5d2721fb900e3565ad1a5a249956ee356c520..e184cd157602a519b4ded7bb98c4f418489aa32a 100644 --- a/castor/io/StreamTapeAccessSpecificationCnv.hpp +++ b/castor/io/StreamTapeAccessSpecificationCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamTapeAccessSpecificationCnv diff --git a/castor/io/StreamTapeDriveCnv.cpp b/castor/io/StreamTapeDriveCnv.cpp index 0fdb5182f74bdd6c448219cac7d719000b4fd479..46dcfacef4a2ab2be5a03599d064eb737ffb81c3 100644 --- a/castor/io/StreamTapeDriveCnv.cpp +++ b/castor/io/StreamTapeDriveCnv.cpp @@ -86,7 +86,7 @@ void castor::io::StreamTapeDriveCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamTapeDriveCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeDriveCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -153,7 +153,7 @@ castor::IObject* castor::io::StreamTapeDriveCnv::createObj(castor::IAddress* add void castor::io::StreamTapeDriveCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* obj = dynamic_cast<castor::vdqm::TapeDrive*>(object); if (0 == obj) { @@ -191,7 +191,7 @@ void castor::io::StreamTapeDriveCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeDriveCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamTapeDriveCnv.hpp b/castor/io/StreamTapeDriveCnv.hpp index f439f0b582eca869943e02a8bc605250eb9af588..9d1e0e3e346e8928def4325b03838ff250ddc9a3 100644 --- a/castor/io/StreamTapeDriveCnv.hpp +++ b/castor/io/StreamTapeDriveCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamTapeDriveCnv diff --git a/castor/io/StreamTapeDriveCompatibilityCnv.cpp b/castor/io/StreamTapeDriveCompatibilityCnv.cpp index 9117f80e8861513e92d8f5eab04b9fc4f2de316a..0a7dc68fa532374b430e8fad41faf0a21acadc71 100644 --- a/castor/io/StreamTapeDriveCompatibilityCnv.cpp +++ b/castor/io/StreamTapeDriveCompatibilityCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamTapeDriveCompatibilityCnv::createRep(castor::IAddress* ad castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamTapeDriveCompatibilityCnv::createRep(castor::IAddress* ad // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeDriveCompatibilityCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -118,7 +118,7 @@ castor::IObject* castor::io::StreamTapeDriveCompatibilityCnv::createObj(castor:: void castor::io::StreamTapeDriveCompatibilityCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveCompatibility* obj = dynamic_cast<castor::vdqm::TapeDriveCompatibility*>(object); if (0 == obj) { @@ -141,7 +141,7 @@ void castor::io::StreamTapeDriveCompatibilityCnv::marshalObject(castor::IObject* //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeDriveCompatibilityCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamTapeDriveCompatibilityCnv.hpp b/castor/io/StreamTapeDriveCompatibilityCnv.hpp index dfc915dcc087d736189bbee6d0f326629a9534ae..2fdebfd31d70acd96ff5a6da8b49f8723e08da24 100644 --- a/castor/io/StreamTapeDriveCompatibilityCnv.hpp +++ b/castor/io/StreamTapeDriveCompatibilityCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamTapeDriveCompatibilityCnv diff --git a/castor/io/StreamTapeDriveDedicationCnv.cpp b/castor/io/StreamTapeDriveDedicationCnv.cpp index 936b48e92594ece390da277d274bdaf549149c7a..e005855725c6b1076035459ced71841736b1ef50 100644 --- a/castor/io/StreamTapeDriveDedicationCnv.cpp +++ b/castor/io/StreamTapeDriveDedicationCnv.cpp @@ -79,7 +79,7 @@ void castor::io::StreamTapeDriveDedicationCnv::createRep(castor::IAddress* addre castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); StreamAddress* ad = @@ -100,7 +100,7 @@ void castor::io::StreamTapeDriveDedicationCnv::createRep(castor::IAddress* addre // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeDriveDedicationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -142,7 +142,7 @@ castor::IObject* castor::io::StreamTapeDriveDedicationCnv::createObj(castor::IAd void castor::io::StreamTapeDriveDedicationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDriveDedication* obj = dynamic_cast<castor::vdqm::TapeDriveDedication*>(object); if (0 == obj) { @@ -165,7 +165,7 @@ void castor::io::StreamTapeDriveDedicationCnv::marshalObject(castor::IObject* ob //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeDriveDedicationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamTapeDriveDedicationCnv.hpp b/castor/io/StreamTapeDriveDedicationCnv.hpp index c8b541b3c77f2af92fa533f8502454d1892af30f..20f9edd409a8b6765297eae5f51f7764b2273938 100644 --- a/castor/io/StreamTapeDriveDedicationCnv.hpp +++ b/castor/io/StreamTapeDriveDedicationCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamTapeDriveDedicationCnv diff --git a/castor/io/StreamTapeRequestCnv.cpp b/castor/io/StreamTapeRequestCnv.cpp index 963eb044253b715bcbca4621996f672e5d25e9ac..e29703f5e30814e5cb8fc529f3c53563024ff42f 100644 --- a/castor/io/StreamTapeRequestCnv.cpp +++ b/castor/io/StreamTapeRequestCnv.cpp @@ -85,7 +85,7 @@ void castor::io::StreamTapeRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); StreamAddress* ad = @@ -105,7 +105,7 @@ void castor::io::StreamTapeRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -144,7 +144,7 @@ castor::IObject* castor::io::StreamTapeRequestCnv::createObj(castor::IAddress* a void castor::io::StreamTapeRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::TapeRequest* obj = dynamic_cast<castor::vdqm::TapeRequest*>(object); if (0 == obj) { @@ -172,7 +172,7 @@ void castor::io::StreamTapeRequestCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamTapeRequestCnv.hpp b/castor/io/StreamTapeRequestCnv.hpp index 8835a9ef1240bb2dbc91cd670a5fdcb6cf7720cf..90bb162f945b1b6213f1cff298bd297b3fffe795 100644 --- a/castor/io/StreamTapeRequestCnv.hpp +++ b/castor/io/StreamTapeRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamTapeRequestCnv diff --git a/castor/io/StreamTapeServerCnv.cpp b/castor/io/StreamTapeServerCnv.cpp index fd791c349abc3a34c0eb39706fb37502ad51302d..d8d1965b1fe0bd1def57a0ceee7139fd1f1e7c64 100644 --- a/castor/io/StreamTapeServerCnv.cpp +++ b/castor/io/StreamTapeServerCnv.cpp @@ -81,7 +81,7 @@ void castor::io::StreamTapeServerCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); StreamAddress* ad = @@ -96,7 +96,7 @@ void castor::io::StreamTapeServerCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeServerCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -120,7 +120,7 @@ castor::IObject* castor::io::StreamTapeServerCnv::createObj(castor::IAddress* ad void castor::io::StreamTapeServerCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::TapeServer* obj = dynamic_cast<castor::vdqm::TapeServer*>(object); if (0 == obj) { @@ -148,7 +148,7 @@ void castor::io::StreamTapeServerCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamTapeServerCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamTapeServerCnv.hpp b/castor/io/StreamTapeServerCnv.hpp index ee8734e43b89ae71854c7b111b8006b949e15a76..6d3e9ce7644fb3a468548b590baa8738dd69c542 100644 --- a/castor/io/StreamTapeServerCnv.hpp +++ b/castor/io/StreamTapeServerCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamTapeServerCnv diff --git a/castor/io/StreamThreadNotificationCnv.cpp b/castor/io/StreamThreadNotificationCnv.cpp index d57099657663b5beeeac2d811b7ebc642369d0ec..c1850b17c531fe20e78bd677d39788ce3ff04f47 100644 --- a/castor/io/StreamThreadNotificationCnv.cpp +++ b/castor/io/StreamThreadNotificationCnv.cpp @@ -77,7 +77,7 @@ void castor::io::StreamThreadNotificationCnv::createRep(castor::IAddress* addres castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::server::ThreadNotification* obj = dynamic_cast<castor::server::ThreadNotification*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamThreadNotificationCnv::createRep(castor::IAddress* addres // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamThreadNotificationCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -116,7 +116,7 @@ castor::IObject* castor::io::StreamThreadNotificationCnv::createObj(castor::IAdd void castor::io::StreamThreadNotificationCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::server::ThreadNotification* obj = dynamic_cast<castor::server::ThreadNotification*>(object); if (0 == obj) { @@ -138,7 +138,7 @@ void castor::io::StreamThreadNotificationCnv::marshalObject(castor::IObject* obj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamThreadNotificationCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamThreadNotificationCnv.hpp b/castor/io/StreamThreadNotificationCnv.hpp index 4497b07f6e802bdeb9b50e811ed4f847f9f2a1bf..7e2f193103f550102e20ad2e01df0c02dc3ddef5 100644 --- a/castor/io/StreamThreadNotificationCnv.hpp +++ b/castor/io/StreamThreadNotificationCnv.hpp @@ -90,7 +90,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -102,7 +102,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -116,7 +116,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -130,7 +130,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamThreadNotificationCnv diff --git a/castor/io/StreamVdqmTapeCnv.cpp b/castor/io/StreamVdqmTapeCnv.cpp index 64ea930c0b0cdeb43dc756467ea0d5affdf9f435..c6f6f35c3e4fb03af56eaddd28c733365d5f9472 100644 --- a/castor/io/StreamVdqmTapeCnv.cpp +++ b/castor/io/StreamVdqmTapeCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamVdqmTapeCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); StreamAddress* ad = @@ -92,7 +92,7 @@ void castor::io::StreamVdqmTapeCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVdqmTapeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -113,7 +113,7 @@ castor::IObject* castor::io::StreamVdqmTapeCnv::createObj(castor::IAddress* addr void castor::io::StreamVdqmTapeCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* obj = dynamic_cast<castor::vdqm::VdqmTape*>(object); if (0 == obj) { @@ -135,7 +135,7 @@ void castor::io::StreamVdqmTapeCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVdqmTapeCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamVdqmTapeCnv.hpp b/castor/io/StreamVdqmTapeCnv.hpp index 5d63f8b85a696d72305adc9f245cdcefc49817ad..fd9afc0b263945bbbeea8d7ca682ce35e51be030 100644 --- a/castor/io/StreamVdqmTapeCnv.hpp +++ b/castor/io/StreamVdqmTapeCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamVdqmTapeCnv diff --git a/castor/io/StreamVersionQueryCnv.cpp b/castor/io/StreamVersionQueryCnv.cpp index 33877406750283a7ef6880a650218855c2235eb9..1e27da44f41a0e2d6d0cc9db237fd9f311675047 100644 --- a/castor/io/StreamVersionQueryCnv.cpp +++ b/castor/io/StreamVersionQueryCnv.cpp @@ -83,7 +83,7 @@ void castor::io::StreamVersionQueryCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); StreamAddress* ad = @@ -108,7 +108,7 @@ void castor::io::StreamVersionQueryCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVersionQueryCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -163,7 +163,7 @@ castor::IObject* castor::io::StreamVersionQueryCnv::createObj(castor::IAddress* void castor::io::StreamVersionQueryCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::VersionQuery* obj = dynamic_cast<castor::query::VersionQuery*>(object); if (0 == obj) { @@ -193,7 +193,7 @@ void castor::io::StreamVersionQueryCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVersionQueryCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamVersionQueryCnv.hpp b/castor/io/StreamVersionQueryCnv.hpp index a9ceb82a3f78f99e1659accaeb6e4795c05f45af..0dda43fb677b9651b39445c91b2bf6d84db79927 100644 --- a/castor/io/StreamVersionQueryCnv.hpp +++ b/castor/io/StreamVersionQueryCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamVersionQueryCnv diff --git a/castor/io/StreamVersionResponseCnv.cpp b/castor/io/StreamVersionResponseCnv.cpp index 935478e646de8afee157e3513874359c82b1c9cf..ab9ebaa7961dcacb3a6cd4db0c64d977d9e40b22 100644 --- a/castor/io/StreamVersionResponseCnv.cpp +++ b/castor/io/StreamVersionResponseCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamVersionResponseCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::query::VersionResponse* obj = dynamic_cast<castor::query::VersionResponse*>(object); StreamAddress* ad = @@ -98,7 +98,7 @@ void castor::io::StreamVersionResponseCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVersionResponseCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -137,7 +137,7 @@ castor::IObject* castor::io::StreamVersionResponseCnv::createObj(castor::IAddres void castor::io::StreamVersionResponseCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::query::VersionResponse* obj = dynamic_cast<castor::query::VersionResponse*>(object); if (0 == obj) { @@ -159,7 +159,7 @@ void castor::io::StreamVersionResponseCnv::marshalObject(castor::IObject* object //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVersionResponseCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamVersionResponseCnv.hpp b/castor/io/StreamVersionResponseCnv.hpp index d970fd38381b325fc2b6b1985400cdfc2437b631..cdcbe959011cbfb8853ccbdd8307ecd0b2fcc6f9 100644 --- a/castor/io/StreamVersionResponseCnv.hpp +++ b/castor/io/StreamVersionResponseCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamVersionResponseCnv diff --git a/castor/io/StreamVolumeCnv.cpp b/castor/io/StreamVolumeCnv.cpp index 38ac8ea723f8d21ef8047a34e652cd5c28d8d452..d28e01456df129bf312547cc88ff29385233e961 100644 --- a/castor/io/StreamVolumeCnv.cpp +++ b/castor/io/StreamVolumeCnv.cpp @@ -80,7 +80,7 @@ void castor::io::StreamVolumeCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::Volume* obj = dynamic_cast<castor::tape::tapegateway::Volume*>(object); StreamAddress* ad = @@ -100,7 +100,7 @@ void castor::io::StreamVolumeCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVolumeCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -139,7 +139,7 @@ castor::IObject* castor::io::StreamVolumeCnv::createObj(castor::IAddress* addres void castor::io::StreamVolumeCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::Volume* obj = dynamic_cast<castor::tape::tapegateway::Volume*>(object); if (0 == obj) { @@ -161,7 +161,7 @@ void castor::io::StreamVolumeCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVolumeCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamVolumeCnv.hpp b/castor/io/StreamVolumeCnv.hpp index 136a2e57cdc2d12db297ddc4d8d620beccb9fa73..f677c39f84cbd12f7f58c0ceef3ce5b91ecdd73f 100644 --- a/castor/io/StreamVolumeCnv.hpp +++ b/castor/io/StreamVolumeCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamVolumeCnv diff --git a/castor/io/StreamVolumeRequestCnv.cpp b/castor/io/StreamVolumeRequestCnv.cpp index c6cc85e7748bdf776e8be515bdb0f36182521ae5..9c314d46d6cd5c81220017cb8a94439705b713fa 100644 --- a/castor/io/StreamVolumeRequestCnv.cpp +++ b/castor/io/StreamVolumeRequestCnv.cpp @@ -78,7 +78,7 @@ void castor::io::StreamVolumeRequestCnv::createRep(castor::IAddress* address, castor::IObject* object, bool, unsigned int) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::VolumeRequest* obj = dynamic_cast<castor::tape::tapegateway::VolumeRequest*>(object); StreamAddress* ad = @@ -94,7 +94,7 @@ void castor::io::StreamVolumeRequestCnv::createRep(castor::IAddress* address, // createObj //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVolumeRequestCnv::createObj(castor::IAddress* address) - throw (castor::exception::Exception) { + { StreamAddress* ad = dynamic_cast<StreamAddress*>(address); // create the new Object @@ -121,7 +121,7 @@ castor::IObject* castor::io::StreamVolumeRequestCnv::createObj(castor::IAddress* void castor::io::StreamVolumeRequestCnv::marshalObject(castor::IObject* object, castor::io::StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception) { + { castor::tape::tapegateway::VolumeRequest* obj = dynamic_cast<castor::tape::tapegateway::VolumeRequest*>(object); if (0 == obj) { @@ -143,7 +143,7 @@ void castor::io::StreamVolumeRequestCnv::marshalObject(castor::IObject* object, //------------------------------------------------------------------------------ castor::IObject* castor::io::StreamVolumeRequestCnv::unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception) { + { castor::io::StreamAddress ad(stream, "StreamCnvSvc", castor::SVC_STREAMCNV); castor::IObject* object = createObj(&ad); // Mark object as created diff --git a/castor/io/StreamVolumeRequestCnv.hpp b/castor/io/StreamVolumeRequestCnv.hpp index 9f837c04cd2350e6b8c789a4baae81e78535364e..462adee362dc09292b0f8aa675b4a4ef4a6ad44c 100644 --- a/castor/io/StreamVolumeRequestCnv.hpp +++ b/castor/io/StreamVolumeRequestCnv.hpp @@ -89,7 +89,7 @@ namespace castor { castor::IObject* object, bool endTransaction, unsigned int type = castor::OBJ_INVALID) - throw (castor::exception::Exception); + ; /** * Creates C++ object from foreign representation @@ -101,7 +101,7 @@ namespace castor { * @exception Exception throws an Exception in case of error */ virtual castor::IObject* createObj(castor::IAddress* address) - throw (castor::exception::Exception); + ; /** * Marshals an object using a StreamAddress. @@ -115,7 +115,7 @@ namespace castor { virtual void marshalObject(castor::IObject* object, StreamAddress* address, castor::ObjectSet& alreadyDone) - throw (castor::exception::Exception); + ; /** * Unmarshals an object from a StreamAddress. @@ -129,7 +129,7 @@ namespace castor { */ virtual castor::IObject* unmarshalObject(castor::io::biniostream& stream, castor::ObjectCatalog& newlyCreated) - throw (castor::exception::Exception); + ; }; // end of class StreamVolumeRequestCnv diff --git a/castor/io/UDPSocket.cpp b/castor/io/UDPSocket.cpp index dd5544ee474793ae36137adce1b73a97ef155fb3..0bd70f3fac654c78ffcfd7a7bf841579e56e832d 100644 --- a/castor/io/UDPSocket.cpp +++ b/castor/io/UDPSocket.cpp @@ -50,7 +50,7 @@ //------------------------------------------------------------------------------ castor::io::UDPSocket::UDPSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception) : + : AbstractSocket(port, reusable) { createSocket(); setReusable(); @@ -62,7 +62,7 @@ castor::io::UDPSocket::UDPSocket(const unsigned short port, castor::io::UDPSocket::UDPSocket(const unsigned short port, const bool reusable, const bool bind) - throw (castor::exception::Exception) : + : AbstractSocket(port, reusable) { createSocket(); setReusable(); @@ -81,7 +81,7 @@ castor::io::UDPSocket::UDPSocket(const unsigned short port, //------------------------------------------------------------------------------ castor::io::UDPSocket::UDPSocket(const unsigned short port, const std::string host) - throw (castor::exception::Exception) : + : AbstractSocket(port, host, false) { createSocket(); } @@ -91,7 +91,7 @@ castor::io::UDPSocket::UDPSocket(const unsigned short port, //------------------------------------------------------------------------------ castor::io::UDPSocket::UDPSocket(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception) : + : AbstractSocket(port, ip, false) { createSocket(); } @@ -100,7 +100,7 @@ castor::io::UDPSocket::UDPSocket(const unsigned short port, // createSocket //------------------------------------------------------------------------------ void castor::io::UDPSocket::createSocket() - throw (castor::exception::Exception) { + { // Creates the socket if ((m_socket = ::socket(AF_INET, SOCK_DGRAM, 0)) < 0) { castor::exception::Exception ex(errno); @@ -115,7 +115,7 @@ void castor::io::UDPSocket::createSocket() void castor::io::UDPSocket::sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception) { + { // Create new buffer to send everything in one go int size = n + 2 * sizeof(unsigned int); char* newBuf = new char[size]; @@ -139,7 +139,7 @@ void castor::io::UDPSocket::sendBuffer(const unsigned int magic, void castor::io::UDPSocket::readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception) { + { // Read everything in one go. Max allowed is 1K char* internalBuf = new char[MAX_UDP_DATAGRAM_LENGTH]; socklen_t fromLen = sizeof(m_saddr); diff --git a/castor/io/UDPSocket.hpp b/castor/io/UDPSocket.hpp index cd49038cc2a54a1938c07fb4bb06745f92b14f80..c2dbe6ed46ecf80ebea4352b5cc5dca8b1f454c0 100644 --- a/castor/io/UDPSocket.hpp +++ b/castor/io/UDPSocket.hpp @@ -48,7 +48,7 @@ namespace castor { */ UDPSocket(const unsigned short port, const bool reusable) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port @@ -59,7 +59,7 @@ namespace castor { */ UDPSocket(const unsigned short port, const std::string host) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port @@ -70,7 +70,7 @@ namespace castor { */ UDPSocket(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given local port for @@ -83,7 +83,7 @@ namespace castor { UDPSocket(const unsigned short port, const bool reusable, const bool bind) - throw (castor::exception::Exception); + ; protected: @@ -91,7 +91,7 @@ namespace castor { * Internal method to create the inner socket * @exception Exception in case of error */ - virtual void createSocket() throw (castor::exception::Exception); + virtual void createSocket() ; /** * Internal method to send the content of a buffer @@ -105,7 +105,7 @@ namespace castor { virtual void sendBuffer(const unsigned int magic, const char* buf, const int n) - throw (castor::exception::Exception); + ; /** * Internal method to read from a socket into a buffer. @@ -120,7 +120,7 @@ namespace castor { virtual void readBuffer(const unsigned int magic, char** buf, int& n) - throw (castor::exception::Exception); + ; }; diff --git a/castor/io/io.cpp b/castor/io/io.cpp index 3457c38e5885ad02afa4e87faa69402463a1dd4e..aaaa5b9c70fccf5cc9d0ab4daf86ca2b0938a951 100644 --- a/castor/io/io.cpp +++ b/castor/io/io.cpp @@ -46,7 +46,7 @@ // createListenerSock //------------------------------------------------------------------------------ int castor::io::createListenerSock(const unsigned short port) - throw(castor::exception::Exception) { + { const unsigned short lowPort = port; const unsigned short highPort = port; unsigned short chosenPort = 0; @@ -65,7 +65,7 @@ int castor::io::createListenerSock( const unsigned short lowPort, const unsigned short highPort, unsigned short &chosenPort) - throw(castor::exception::Exception) { + { struct in_addr networkAddress; memset(&networkAddress, '\0', sizeof(networkAddress)); @@ -82,7 +82,7 @@ int castor::io::createListenerSock( const unsigned short lowPort, const unsigned short highPort, unsigned short &chosenPort) - throw(castor::exception::Exception) { + { struct in_addr networkAddress; @@ -105,7 +105,7 @@ int castor::io::createListenerSock( const unsigned short lowPort, const unsigned short highPort, unsigned short &chosenPort) - throw(castor::exception::Exception) { + { // Check range validity if(lowPort < 1) { @@ -231,7 +231,7 @@ int castor::io::createListenerSock( // createLocalhostListenerSockBoundToLocalhost //------------------------------------------------------------------------------ int castor::io::createLocalhostListenerSock(const unsigned short port) - throw(castor::exception::Exception) { + { const unsigned short lowPort = port; const unsigned short highPort = port; unsigned short chosenPort = 0; @@ -253,7 +253,7 @@ int castor::io::createLocalhostListenerSock(const unsigned short port) // acceptConnection //------------------------------------------------------------------------------ int castor::io::acceptConnection(const int listenSocketFd) - throw(castor::exception::Exception) { + { // Throw an exception if listenSocketFd is invalid if(listenSocketFd < 0) { @@ -343,7 +343,7 @@ int castor::io::acceptConnection(const int listenSocketFd, castor::exception::AcceptConnectionInterrupted ex(remainingTime); - throw(ex); + throw ex; } else { char errBuf[100]; sstrerror_r(selectErrno, errBuf, sizeof(errBuf)); @@ -397,7 +397,7 @@ int castor::io::acceptConnection(const int listenSocketFd, // getSockIpPort //------------------------------------------------------------------------------ castor::io::IpAndPort castor::io::getSockIpPort( - const int socketFd) throw(castor::exception::Exception) { + const int socketFd) { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -428,7 +428,7 @@ castor::io::IpAndPort castor::io::getSockIpPort( // getPeerIpPort //------------------------------------------------------------------------------ castor::io::IpAndPort castor::io::getPeerIpPort( - const int socketFd) throw(castor::exception::Exception) { + const int socketFd) { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -462,7 +462,7 @@ void castor::io::getSockHostName( const int socketFd, char *const buf, const size_t len) - throw(castor::exception::Exception) { + { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -511,7 +511,7 @@ void castor::io::getSockIpHostnamePort( char *const hostName, const size_t hostNameLen, unsigned short &port) - throw(castor::exception::Exception) { + { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -562,7 +562,7 @@ void castor::io::getPeerHostName( const int socketFd, char *const buf, const size_t len) - throw(castor::exception::Exception) { + { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -669,7 +669,7 @@ void castor::io::readBytes( const int timeout, const int nbBytes, char *const buf) - throw(castor::exception::Exception) { + { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -703,7 +703,7 @@ bool castor::io::readBytesFromCloseable( const int timeout, const int nbBytes, char *const buf) - throw(castor::exception::Exception) { + { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -776,7 +776,7 @@ void castor::io::writeBytes( const int timeout, const int nbBytes, char *const buf) - throw(castor::exception::Exception) { + { // Throw an exception if socketFd is invalid if(socketFd < 0) { @@ -1113,7 +1113,7 @@ int castor::io::connectWithTimeout( // marshalUint8 //------------------------------------------------------------------------------ void castor::io::marshalUint8(const uint8_t src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1130,7 +1130,7 @@ void castor::io::marshalUint8(const uint8_t src, char * &dst) // marshalInt16 //------------------------------------------------------------------------------ void castor::io::marshalInt16(const int16_t src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1148,7 +1148,7 @@ void castor::io::marshalInt16(const int16_t src, char * &dst) // marshalUint16 //------------------------------------------------------------------------------ void castor::io::marshalUint16(const uint16_t src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1166,7 +1166,7 @@ void castor::io::marshalUint16(const uint16_t src, char * &dst) // marshalInt32 //------------------------------------------------------------------------------ void castor::io::marshalInt32(const int32_t src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1184,7 +1184,7 @@ void castor::io::marshalInt32(const int32_t src, char * &dst) // marshalUint32 //------------------------------------------------------------------------------ void castor::io::marshalUint32(const uint32_t src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1202,7 +1202,7 @@ void castor::io::marshalUint32(const uint32_t src, char * &dst) // marshalUint64 //------------------------------------------------------------------------------ void castor::io::marshalUint64(const uint64_t src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1229,7 +1229,7 @@ void castor::io::marshalUint64(const uint64_t src, char * &dst) // marshalString //------------------------------------------------------------------------------ void castor::io::marshalString(const std::string &src, char * &dst) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -1247,7 +1247,7 @@ void castor::io::marshalString(const std::string &src, char * &dst) // unmarshalUint8 //------------------------------------------------------------------------------ void castor::io::unmarshalUint8(const char * &src, size_t &srcLen, - uint8_t &dst) throw(castor::exception::Exception) { + uint8_t &dst) { if(src == NULL) { castor::exception::Exception ex(EINVAL); @@ -1273,7 +1273,7 @@ void castor::io::unmarshalUint8(const char * &src, size_t &srcLen, // unmarshalInt16 //------------------------------------------------------------------------------ void castor::io::unmarshalInt16(const char * &src, size_t &srcLen, - int16_t &dst) throw(castor::exception::Exception) { + int16_t &dst) { if(src == NULL) { castor::exception::Exception ex(EINVAL); @@ -1301,7 +1301,7 @@ void castor::io::unmarshalInt16(const char * &src, size_t &srcLen, // unmarshalUint16 //------------------------------------------------------------------------------ void castor::io::unmarshalUint16(const char * &src, size_t &srcLen, - uint16_t &dst) throw(castor::exception::Exception) { + uint16_t &dst) { if(src == NULL) { castor::exception::Exception ex(EINVAL); @@ -1329,7 +1329,7 @@ void castor::io::unmarshalUint16(const char * &src, size_t &srcLen, // unmarshalUint32 //------------------------------------------------------------------------------ void castor::io::unmarshalUint32(const char * &src, size_t &srcLen, - uint32_t &dst) throw(castor::exception::Exception) { + uint32_t &dst) { if(src == NULL) { castor::exception::Exception ex(EINVAL); @@ -1357,7 +1357,7 @@ void castor::io::unmarshalUint32(const char * &src, size_t &srcLen, // unmarshalInt32 //------------------------------------------------------------------------------ void castor::io::unmarshalInt32(const char * &src, size_t &srcLen, - int32_t &dst) throw(castor::exception::Exception) { + int32_t &dst) { if(src == NULL) { castor::exception::Exception ex(EINVAL); @@ -1385,7 +1385,7 @@ void castor::io::unmarshalInt32(const char * &src, size_t &srcLen, // unmarshalUint64 //------------------------------------------------------------------------------ void castor::io::unmarshalUint64(const char * &src, size_t &srcLen, - uint64_t &dst) throw(castor::exception::Exception) { + uint64_t &dst) { if(src == NULL) { castor::exception::Exception ex(EINVAL); @@ -1419,7 +1419,7 @@ void castor::io::unmarshalUint64(const char * &src, size_t &srcLen, //------------------------------------------------------------------------------ void castor::io::unmarshalString(const char * &src, size_t &srcLen, char *dst, const size_t dstLen) - throw(castor::exception::Exception) { + { if(src == NULL) { castor::exception::Exception ex(EINVAL); diff --git a/castor/io/io.hpp b/castor/io/io.hpp index 9731f6ccc769f89afa68c30b98222e7443c50221..b3d60739ea50cbe21dfe8b649dca22395ff8575f 100644 --- a/castor/io/io.hpp +++ b/castor/io/io.hpp @@ -69,7 +69,7 @@ namespace io { * @return The socket descriptor. */ int createListenerSock(const unsigned short port) - throw(castor::exception::Exception); + ; /** * Creates a listener socket with a port number within the specified range. @@ -96,7 +96,7 @@ int createListenerSock( const unsigned short lowPort, const unsigned short highPort, unsigned short &chosenPort) - throw(castor::exception::Exception); + ; /** * Creates a listener socket with a port number within the specified range. @@ -123,7 +123,7 @@ int createListenerSock( const unsigned short lowPort, const unsigned short highPort, unsigned short &chosenPort) - throw(castor::exception::Exception); + ; /** * Creates a listener socket with a port number within the specified range. @@ -149,7 +149,7 @@ int createListenerSock( const unsigned short lowPort, const unsigned short highPort, unsigned short &chosenPort) - throw(castor::exception::Exception); + ; /** * Creates a listener socket with the specified port number that is bound to @@ -170,7 +170,7 @@ int createListenerSock( * @return The socket descriptor. */ int createLocalhostListenerSock(const unsigned short port) - throw(castor::exception::Exception); + ; /** * Accepts a connection on the specified listener socket and returns the @@ -181,7 +181,7 @@ int createLocalhostListenerSock(const unsigned short port) * socket. */ int acceptConnection(const int listenSockFd) - throw(castor::exception::Exception); + ; /** * Accepts a connection on the specified listener socket and returns the @@ -219,7 +219,7 @@ int acceptConnection( * @return The IP and port number of the specified socket. */ IpAndPort getSockIpPort(const int socketFd) - throw(castor::exception::Exception); + ; /** * Gets the peer IP and port number of the specified socket. @@ -228,7 +228,7 @@ IpAndPort getSockIpPort(const int socketFd) * @return The IP and port number of the specified socket. */ IpAndPort getPeerIpPort(const int socketFd) - throw(castor::exception::Exception); + ; /** * Gets the locally-bound host name of the specified socket. @@ -242,7 +242,7 @@ void getSockHostName( const int socketFd, char *const buf, const size_t len) - throw(castor::exception::Exception); + ; /** * Gets the locally-bound host name of the specified socket. @@ -253,7 +253,7 @@ void getSockHostName( template<int n> static void getSockHostName( const int socketFd, char (&buf)[n]) - throw(castor::exception::Exception) { + { getSockHostName(socketFd, buf, n); } @@ -272,7 +272,7 @@ void getSockIpHostnamePort( unsigned long &ip, char *const hostName, const size_t hostNameLen, - unsigned short &port) throw(castor::exception::Exception); + unsigned short &port) ; /** * Gets the locally-bound IP, host name and port of the specified socket. @@ -287,7 +287,7 @@ template<int n> static void getSockIpHostnamePort( unsigned long &ip, char (&hostName)[n], unsigned short &port) - throw(castor::exception::Exception) { + { getSockIpHostnamePort(socketFd, ip, hostName, n, port); } @@ -303,7 +303,7 @@ void getPeerHostName( const int socketFd, char *const buf, const size_t len) - throw(castor::exception::Exception); + ; /** * Gets the peer host name of the specified connection. @@ -314,7 +314,7 @@ void getPeerHostName( template<int n> static void getPeerHostName( const int socketFd, char (&buf)[n]) - throw(castor::exception::Exception) { + { getPeerHostName(socketFd, buf, n); } @@ -365,7 +365,7 @@ void readBytes( const int timeout, const int nbBytes, char *const buf) - throw(castor::exception::Exception); + ; /** * Reads the specified number of bytes from the specified closable socket @@ -382,7 +382,7 @@ bool readBytesFromCloseable( const int timeout, const int nbBytes, char *const buf) - throw(castor::exception::Exception); + ; /** * Writes the specified number of bytes from the specified buffer to the @@ -398,7 +398,7 @@ void writeBytes( const int timeout, const int nbBytes, char *const buf) - throw(castor::exception::Exception); + ; /** * Creates the specified socket and uses it to connect to the specified @@ -465,7 +465,7 @@ int connectWithTimeout( * the marshalled value. */ void marshalUint8(const uint8_t src, char * &dst) - throw(castor::exception::Exception); + ; /** * Marshals the specified src value into the specified destination buffer. @@ -477,7 +477,7 @@ void marshalUint8(const uint8_t src, char * &dst) * the marshalled value. */ void marshalInt16(const int16_t src, char * &dst) - throw(castor::exception::Exception); + ; /** * Marshals the specified src value into the specified destination buffer. @@ -489,7 +489,7 @@ void marshalInt16(const int16_t src, char * &dst) * the marshalled value. */ void marshalUint16(const uint16_t src, char * &dst) - throw(castor::exception::Exception); + ; /** * Marshals the specified src value into the specified destination buffer. @@ -501,7 +501,7 @@ void marshalUint16(const uint16_t src, char * &dst) * the marshalled value. */ void marshalInt32(const int32_t src, char * &dst) - throw(castor::exception::Exception); + ; /** * Marshals the specified src value into the specified destination buffer. @@ -513,7 +513,7 @@ void marshalInt32(const int32_t src, char * &dst) * the marshalled value. */ void marshalUint32(const uint32_t src, char * &dst) - throw(castor::exception::Exception); + ; /** * Marshals the specified src value into the specified destination buffer. @@ -525,7 +525,7 @@ void marshalUint32(const uint32_t src, char * &dst) * the marshalled value. */ void marshalUint64(const uint64_t src, char * &dst) - throw(castor::exception::Exception); + ; /** * Marshals the specified string into the specified destination buffer. @@ -537,7 +537,7 @@ void marshalUint64(const uint64_t src, char * &dst) * string. */ void marshalString(const std::string &src, char * &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a value from the specified source buffer into the specified @@ -554,7 +554,7 @@ void marshalString(const std::string &src, char * &dst) * @param dst Out parameter: The destination. */ void unmarshalUint8(const char * &src, size_t &srcLen, uint8_t &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a value from the specified source buffer into the specified @@ -571,7 +571,7 @@ void unmarshalUint8(const char * &src, size_t &srcLen, uint8_t &dst) * @param dst Out parameter: The destination. */ void unmarshalInt16(const char * &src, size_t &srcLen, int16_t &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a value from the specified source buffer into the specified @@ -588,7 +588,7 @@ void unmarshalInt16(const char * &src, size_t &srcLen, int16_t &dst) * @param dst Out parameter: The destination. */ void unmarshalUint16(const char * &src, size_t &srcLen, uint16_t &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a value from the specified source buffer into the specified @@ -605,7 +605,7 @@ void unmarshalUint16(const char * &src, size_t &srcLen, uint16_t &dst) * @param dst Out parameter: The destination. */ void unmarshalUint32(const char * &src, size_t &srcLen, uint32_t &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a value from the specified source buffer into the specified @@ -622,7 +622,7 @@ void unmarshalUint32(const char * &src, size_t &srcLen, uint32_t &dst) * @param dst Out parameter: The destination. */ void unmarshalInt32(const char * &src, size_t &srcLen, int32_t &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a value from the specified source buffer into the specified @@ -639,7 +639,7 @@ void unmarshalInt32(const char * &src, size_t &srcLen, int32_t &dst) * @param dst Out parameter: The destination. */ void unmarshalUint64(const char * &src, size_t &srcLen, uint64_t &dst) - throw(castor::exception::Exception); + ; /** * Unmarshals a string from the specified source buffer into the specified @@ -660,7 +660,7 @@ void unmarshalUint64(const char * &src, size_t &srcLen, uint64_t &dst) * should be unmarshalled to. */ void unmarshalString(const char * &src, size_t &srcLen, char *dst, - const size_t dstLen) throw(castor::exception::Exception); + const size_t dstLen) ; /** * Unmarshals a string from the specified source buffer into the specified @@ -679,7 +679,7 @@ void unmarshalString(const char * &src, size_t &srcLen, char *dst, * string. */ template<int n> void unmarshalString(const char * &src, - size_t &srcLen, char (&dst)[n]) throw(castor::exception::Exception) { + size_t &srcLen, char (&dst)[n]) { unmarshalString(src, srcLen, dst, n); } diff --git a/castor/job/stagerjob/BasePlugin.hpp b/castor/job/stagerjob/BasePlugin.hpp index 8efd4c18e6627fe2ed5322b5fd2a8dee0e50bacc..051773aac77f3635df4a981f3454f9640ebe90c1 100644 --- a/castor/job/stagerjob/BasePlugin.hpp +++ b/castor/job/stagerjob/BasePlugin.hpp @@ -67,7 +67,7 @@ namespace castor { virtual void preForkHook (castor::job::stagerjob::InputArguments&, castor::job::stagerjob::PluginContext&) - throw (castor::exception::Exception) {}; + {}; protected: diff --git a/castor/job/stagerjob/GridFTPPlugin.cpp b/castor/job/stagerjob/GridFTPPlugin.cpp index 4ebadc9f5cc1bd95834bfc2459b12e66a8857034..b67ff2458b16b8353582da86037a71b3ee0cca78 100644 --- a/castor/job/stagerjob/GridFTPPlugin.cpp +++ b/castor/job/stagerjob/GridFTPPlugin.cpp @@ -134,7 +134,7 @@ castor::job::stagerjob::GridFTPPlugin::getPortRange //------------------------------------------------------------------------------ void castor::job::stagerjob::GridFTPPlugin::getEnvironment (InputArguments &args, Environment &env) - throw(castor::exception::Exception) { + { // Get the location of globus char* globus_location = getenv("GLOBUS_LOCATION"); if (globus_location == NULL) { @@ -235,7 +235,7 @@ void castor::job::stagerjob::GridFTPPlugin::getEnvironment //------------------------------------------------------------------------------ void castor::job::stagerjob::GridFTPPlugin::preForkHook (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Set the default time out for select char *value = getconfent("GSIFTP", "TIMEOUT", 0); int t = SELECT_TIMEOUT_GSIFTP; @@ -264,7 +264,7 @@ void castor::job::stagerjob::GridFTPPlugin::preForkHook void castor::job::stagerjob::GridFTPPlugin::postForkHook (InputArguments &args, PluginContext &context, bool /*useChksSum*/, int /*moverStatus*/) - throw(castor::exception::Exception) { + { // Get environment Environment env; getEnvironment(args, env); @@ -314,7 +314,7 @@ void castor::job::stagerjob::GridFTPPlugin::postForkHook //------------------------------------------------------------------------------ void castor::job::stagerjob::GridFTPPlugin::execMover (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Get environment Environment env; getEnvironment(args, env); diff --git a/castor/job/stagerjob/GridFTPPlugin.hpp b/castor/job/stagerjob/GridFTPPlugin.hpp index e715c3cba4069effca080ff5c2fc31edf9d59550..372d1c7050932bdb6d2b982f30335d46509d5550 100644 --- a/castor/job/stagerjob/GridFTPPlugin.hpp +++ b/castor/job/stagerjob/GridFTPPlugin.hpp @@ -80,7 +80,7 @@ namespace castor { */ virtual void preForkHook(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; /** * Hook for the code to be executed just after the mover fork, @@ -101,7 +101,7 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception); + ; /** * Hook for the launching of the mover @@ -110,7 +110,7 @@ namespace castor { */ virtual void execMover(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; private: @@ -128,7 +128,7 @@ namespace castor { */ static void getEnvironment(InputArguments &args, Environment &env) - throw (castor::exception::Exception); + ; }; // end of class GridFTPPlugin diff --git a/castor/job/stagerjob/IPlugin.hpp b/castor/job/stagerjob/IPlugin.hpp index 85d590bf23b9ed2bd4b12f616e1d07cd86a776d4..406b2ca69dc11ca5df445859d8a98595def6dd79 100644 --- a/castor/job/stagerjob/IPlugin.hpp +++ b/castor/job/stagerjob/IPlugin.hpp @@ -65,7 +65,7 @@ namespace castor { */ virtual void preForkHook(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception) = 0; + = 0; /** * Hook for the launching of the mover @@ -75,7 +75,7 @@ namespace castor { */ virtual void execMover(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception) = 0; + = 0; /** * Hook for the code to be executed just after the mover fork, @@ -95,7 +95,7 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IPlugin diff --git a/castor/job/stagerjob/InputArguments.cpp b/castor/job/stagerjob/InputArguments.cpp index f28796c31e557e6d3cd132af12a9e931d28ed2a0..e4413e23cca2cb26a83ee74b9226ab1622b1534b 100644 --- a/castor/job/stagerjob/InputArguments.cpp +++ b/castor/job/stagerjob/InputArguments.cpp @@ -39,7 +39,7 @@ // constructor //------------------------------------------------------------------------------ castor::job::stagerjob::InputArguments::InputArguments(int argc, char** argv) - throw (castor::exception::Exception) : + : requestUuid(nullCuuid), subRequestUuid(nullCuuid), rawRequestUuid(""), diff --git a/castor/job/stagerjob/InputArguments.hpp b/castor/job/stagerjob/InputArguments.hpp index 24b869b499a6f446d17614ecfbb3f9c2507b461f..dad8741c98d33930006c0d73fd04dc58cb9c223b 100644 --- a/castor/job/stagerjob/InputArguments.hpp +++ b/castor/job/stagerjob/InputArguments.hpp @@ -62,7 +62,7 @@ namespace castor { * @param argc the number of arguments on the command line */ InputArguments(int argc, char** argv) - throw (castor::exception::Exception); + ; public: diff --git a/castor/job/stagerjob/InstrumentedMoverPlugin.cpp b/castor/job/stagerjob/InstrumentedMoverPlugin.cpp index 4e52d6790d57d93aba8a76c0c5a840aaf3cd9ffd..67ed95e4d67f324950e2521afd33011f06e4c9e2 100644 --- a/castor/job/stagerjob/InstrumentedMoverPlugin.cpp +++ b/castor/job/stagerjob/InstrumentedMoverPlugin.cpp @@ -55,7 +55,7 @@ castor::job::stagerjob::InstrumentedMoverPlugin::InstrumentedMoverPlugin void castor::job::stagerjob::InstrumentedMoverPlugin::postForkHook (InputArguments &args, PluginContext &context, bool /*useChksSum*/, int /*moverStatus*/) - throw(castor::exception::Exception) { + { // Answer the client so that it can connect to the mover castor::rh::IOResponse ioResponse; ioResponse.setStatus(castor::stager::SUBREQUEST_READY); @@ -77,7 +77,7 @@ void castor::job::stagerjob::InstrumentedMoverPlugin::postForkHook //------------------------------------------------------------------------------ void castor::job::stagerjob::InstrumentedMoverPlugin::waitChildAndInformStager (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Wait for children bool childFailed = waitForChild(args); // No longer waiting for any mover processes diff --git a/castor/job/stagerjob/InstrumentedMoverPlugin.hpp b/castor/job/stagerjob/InstrumentedMoverPlugin.hpp index 5b776146b9f2cf98bcdfcfbab176c8436b3e38a8..ee327d8cac30728024a2ded435560d54c678f379 100644 --- a/castor/job/stagerjob/InstrumentedMoverPlugin.hpp +++ b/castor/job/stagerjob/InstrumentedMoverPlugin.hpp @@ -73,7 +73,7 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception); + ; protected : @@ -87,7 +87,7 @@ namespace castor { */ void waitChildAndInformStager(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; }; // end of class InstrumentedMoverPlugin diff --git a/castor/job/stagerjob/RawMoverPlugin.cpp b/castor/job/stagerjob/RawMoverPlugin.cpp index 4e8adeae470e3682b845376d94a4228c1c5d8948..03d28114f49a87e2b140da561d9fe97bd876064f 100644 --- a/castor/job/stagerjob/RawMoverPlugin.cpp +++ b/castor/job/stagerjob/RawMoverPlugin.cpp @@ -61,7 +61,7 @@ castor::job::stagerjob::RawMoverPlugin::RawMoverPlugin //------------------------------------------------------------------------------ void castor::job::stagerjob::RawMoverPlugin::preForkHook (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // For raw movers we use the inetd mode : // we send the I/O response before forking the mover castor::rh::IOResponse ioResponse; @@ -143,7 +143,7 @@ void castor::job::stagerjob::RawMoverPlugin::preForkHook void castor::job::stagerjob::RawMoverPlugin::postForkHook (InputArguments &args, PluginContext &context, bool useChkSum, int moverStatus) - throw(castor::exception::Exception) { + { bool childFailed; if (moverStatus == -1) { // Wait for children diff --git a/castor/job/stagerjob/RawMoverPlugin.hpp b/castor/job/stagerjob/RawMoverPlugin.hpp index f5071a8136e69aa8a9121e6300b6ae9ac542a569..093d7f53cb2f0ec0907648fd2606e6f66545f5cc 100644 --- a/castor/job/stagerjob/RawMoverPlugin.hpp +++ b/castor/job/stagerjob/RawMoverPlugin.hpp @@ -62,7 +62,7 @@ namespace castor { */ virtual void preForkHook(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; /** * Hook for the code to be executed just after the mover fork, @@ -84,7 +84,7 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception); + ; }; // end of class RawMoverPlugin diff --git a/castor/job/stagerjob/RfioPlugin.cpp b/castor/job/stagerjob/RfioPlugin.cpp index 4bf33ef4b35b8f16869b342aaa65e041c91b2d66..49015168ce8a2818a31a2a1449ff7723bb711594 100644 --- a/castor/job/stagerjob/RfioPlugin.cpp +++ b/castor/job/stagerjob/RfioPlugin.cpp @@ -153,7 +153,7 @@ void castor::job::stagerjob::RfioPlugin::getLogLevel // setEnvironment //------------------------------------------------------------------------------ void castor::job::stagerjob::RfioPlugin::setEnvironment -(EnvironmentRfio env) throw () { +(EnvironmentRfio env) throw() { setenv("CSEC_TRACE", env.csec_trace.c_str(), 1); setenv("CSEC_TRACEFILE", env.csec_tracefile.c_str(), 1); setenv("CSEC_MECH", env.csec_mech.c_str(), 1); @@ -170,7 +170,7 @@ void castor::job::stagerjob::RfioPlugin::setEnvironment // getEnvironment //------------------------------------------------------------------------------ void castor::job::stagerjob::RfioPlugin::getEnvironment -(InputArguments&, EnvironmentRfio &env) throw () { +(InputArguments&, EnvironmentRfio &env) throw() { // Globus location, required to resolved some dependencies const char* globus_location = getconfent("CSEC", "GLOBUS_LOCATION", 0); if (globus_location == NULL) { @@ -245,7 +245,7 @@ void castor::job::stagerjob::RfioPlugin::getEnvironment void castor::job::stagerjob::RfioPlugin::postForkHook (InputArguments &args, PluginContext &context, bool /*useChksSum*/, int /*moverStatus*/) - throw(castor::exception::Exception) { + { // Log the mover command line on behalf of the mover process that cannot log std::string logFile; @@ -297,7 +297,7 @@ void castor::job::stagerjob::RfioPlugin::postForkHook //------------------------------------------------------------------------------ void castor::job::stagerjob::RfioPlugin::execMover (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Get environment EnvironmentRfio env; diff --git a/castor/job/stagerjob/RfioPlugin.hpp b/castor/job/stagerjob/RfioPlugin.hpp index 0fcc35e7d423967aa07ba09ab5b730c782266a51..10dba8be8abbf87c4ec9bf400b7830df012ca637 100644 --- a/castor/job/stagerjob/RfioPlugin.hpp +++ b/castor/job/stagerjob/RfioPlugin.hpp @@ -86,7 +86,7 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception); + ; /** * Hook for the launching of the mover @@ -95,7 +95,7 @@ namespace castor { */ virtual void execMover(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; private: diff --git a/castor/job/stagerjob/RootPlugin.cpp b/castor/job/stagerjob/RootPlugin.cpp index f5c995e02c3951a582c3f0db5a1ecf8e563b6157..4b647a822526e00ba9b8053272c0cd42ed780415 100644 --- a/castor/job/stagerjob/RootPlugin.cpp +++ b/castor/job/stagerjob/RootPlugin.cpp @@ -134,7 +134,7 @@ castor::job::stagerjob::RootPlugin::getPortRange //------------------------------------------------------------------------------ void castor::job::stagerjob::RootPlugin::preForkHook (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Set the default time out for select char *value = getconfent("ROOT", "TIMEOUT", 0); int t = SELECT_TIMEOUT_ROOT; @@ -213,7 +213,7 @@ void castor::job::stagerjob::RootPlugin::preForkHook void castor::job::stagerjob::RootPlugin::postForkHook (InputArguments &args, PluginContext &context, bool /*useChksSum*/, int /*moverStatus*/) - throw(castor::exception::Exception) { + { // Get ROOTSYS const char *rootsys_default = "/usr/local/bin"; const char *rootsys = getenv("ROOTSYS"); @@ -277,7 +277,7 @@ void castor::job::stagerjob::RootPlugin::postForkHook //------------------------------------------------------------------------------ void castor::job::stagerjob::RootPlugin::execMover (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Get ROOTSYS const char *rootsys_default = "/usr/local/bin"; const char *rootsys = getenv("ROOTSYS"); diff --git a/castor/job/stagerjob/RootPlugin.hpp b/castor/job/stagerjob/RootPlugin.hpp index b9cc8ca768d810a1eac51f6217cf1bdf5bdb851c..9309400a583ef3b2708c2dfdd53f9f84e558dc38 100644 --- a/castor/job/stagerjob/RootPlugin.hpp +++ b/castor/job/stagerjob/RootPlugin.hpp @@ -62,7 +62,7 @@ namespace castor { */ virtual void preForkHook(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; /** * Hook for the code to be executed just after the mover fork, @@ -83,7 +83,7 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception); + ; /** * Hook for the launching of the mover @@ -92,7 +92,7 @@ namespace castor { */ virtual void execMover(InputArguments &args, PluginContext &context) - throw (castor::exception::Exception); + ; private: diff --git a/castor/job/stagerjob/StagerJob.cpp b/castor/job/stagerjob/StagerJob.cpp index 241e153cbad015c10b701a2de6c29a1855b871b7..d5a12d49f3c1f1b92b730fae2c8dec4e51006a14 100644 --- a/castor/job/stagerjob/StagerJob.cpp +++ b/castor/job/stagerjob/StagerJob.cpp @@ -60,7 +60,7 @@ static bool clientAnswered = false; //------------------------------------------------------------------------------ castor::job::stagerjob::IPlugin* castor::job::stagerjob::getPlugin(std::string protocol) - throw (castor::exception::Exception) { + { if (0 != s_plugins && s_plugins->find(protocol) != s_plugins->end()) { return s_plugins->operator[](protocol); } @@ -75,7 +75,7 @@ castor::job::stagerjob::getPlugin(std::string protocol) //------------------------------------------------------------------------------ void castor::job::stagerjob::registerPlugin (std::string protocol, castor::job::stagerjob::IPlugin* plugin) - throw () { + throw() { if (0 == s_plugins) { s_plugins = new std::map<std::string, castor::job::stagerjob::IPlugin*>(); } @@ -86,7 +86,7 @@ void castor::job::stagerjob::registerPlugin // getJobSvc //------------------------------------------------------------------------------ castor::stager::IJobSvc* getJobSvc() - throw (castor::exception::Exception) { + { // Initialize the remote job service castor::IService *remsvc = castor::BaseObject::services()->service @@ -112,7 +112,7 @@ castor::stager::IJobSvc* getJobSvc() std::string startAndGetPath (castor::job::stagerjob::InputArguments* args, castor::job::stagerjob::PluginContext& context) - throw (castor::exception::Exception) { + { // Create a subreq in memory and we will just fill its id castor::stager::SubRequest subrequest; @@ -197,7 +197,7 @@ std::string startAndGetPath // switchToCastorSuperuser //------------------------------------------------------------------------------ void switchToCastorSuperuser(castor::job::stagerjob::InputArguments *args) - throw (castor::exception::Exception) { + { // "Credentials at start time" castor::dlf::Param params[] = @@ -229,7 +229,7 @@ void switchToCastorSuperuser(castor::job::stagerjob::InputArguments *args) // createSocket //------------------------------------------------------------------------------ void createSocket(castor::job::stagerjob::PluginContext &context) - throw (castor::exception::Exception) { + { // Create the socket context.socket = socket(AF_INET, SOCK_STREAM, 0); if (context.socket < 0) { @@ -255,7 +255,7 @@ void bindSocketAndListen (castor::job::stagerjob::PluginContext &context, castor::job::stagerjob::InputArguments* args, std::pair<int,int> &range) - throw (castor::exception::Exception) { + { // Build address struct sockaddr_in sin; memset(&sin, '\0', sizeof(sin)); @@ -326,7 +326,7 @@ void bindSocketAndListen //------------------------------------------------------------------------------ void process(castor::job::stagerjob::PluginContext &context, castor::job::stagerjob::InputArguments* args) - throw (castor::exception::Exception) { + { castor::job::stagerjob::IPlugin* plugin = 0; try { // First switch to stage:st privileges @@ -444,7 +444,7 @@ void process(castor::job::stagerjob::PluginContext &context, void castor::job::stagerjob::sendResponse (castor::IClient *client, castor::rh::IOResponse &response) - throw (castor::exception::Exception) { + { castor::rh::Client* rhc = dynamic_cast<castor::rh::Client*>(client); if (0 == rhc) { castor::exception::Exception e; diff --git a/castor/job/stagerjob/StagerJob.hpp b/castor/job/stagerjob/StagerJob.hpp index 3e6dc7a6888044bc90145e338ededbf5c8df8d1a..9df10df0b1c82211cbd2286e12279d8d6062daa8 100644 --- a/castor/job/stagerjob/StagerJob.hpp +++ b/castor/job/stagerjob/StagerJob.hpp @@ -135,7 +135,7 @@ namespace castor { * @param protocol the requested protocol */ IPlugin* getPlugin(std::string protocol) - throw (castor::exception::Exception); + ; /** * Registers a new plugin @@ -154,7 +154,7 @@ namespace castor { */ void sendResponse(castor::IClient *client, castor::rh::IOResponse &response) - throw (castor::exception::Exception); + ; } // end of namespace stagerjob diff --git a/castor/job/stagerjob/XRootPlugin.cpp b/castor/job/stagerjob/XRootPlugin.cpp index 5bd61c34fa55aef2a860f3b8f48d23143a2bc954..1722daef4361b0a0828f623e60c754e1ac84174f 100644 --- a/castor/job/stagerjob/XRootPlugin.cpp +++ b/castor/job/stagerjob/XRootPlugin.cpp @@ -68,7 +68,7 @@ castor::job::stagerjob::XRootPlugin::XRootPlugin() throw(): //------------------------------------------------------------------------------ void castor::job::stagerjob::XRootPlugin::recvMessage (int socket, char *buf, ssize_t len, int timeout) - throw(castor::exception::Exception) { + { // Read the data from the socket int n = netread_timeout(socket, buf, len, timeout); @@ -90,7 +90,7 @@ void castor::job::stagerjob::XRootPlugin::recvMessage //------------------------------------------------------------------------------ void castor::job::stagerjob::XRootPlugin::preForkHook (InputArguments &args, PluginContext &context) - throw(castor::exception::Exception) { + { // Answer the client so that it can connect to the mover castor::rh::IOResponse ioResponse; @@ -221,7 +221,7 @@ void castor::job::stagerjob::XRootPlugin::preForkHook void castor::job::stagerjob::XRootPlugin::postForkHook (InputArguments &args, PluginContext &context, bool /*useChksSum*/, int /*moverStatus*/) - throw(castor::exception::Exception) { + { // Variables bool moverStatus; diff --git a/castor/job/stagerjob/XRootPlugin.hpp b/castor/job/stagerjob/XRootPlugin.hpp index 76f5e262f227678f7bb3e7564995c3a50a48335b..09fa214618816be05d5e233393b828ff409157a2 100644 --- a/castor/job/stagerjob/XRootPlugin.hpp +++ b/castor/job/stagerjob/XRootPlugin.hpp @@ -58,7 +58,7 @@ namespace castor { * @exception Exception in case of error. */ void recvMessage(int socket, char *buf, ssize_t len, int timeout) - throw(castor::exception::Exception); + ; /** * The preForkHook used to establish a control channel with the local @@ -68,7 +68,7 @@ namespace castor { */ virtual void preForkHook(InputArguments &args, PluginContext &context) - throw(castor::exception::Exception); + ; /** * Hook to wait for the closure of a file. @@ -87,12 +87,12 @@ namespace castor { PluginContext &context, bool useChksSum = false, int moverStatus = -1) - throw (castor::exception::Exception); + ; /// Not implemented virtual void execMover(InputArguments&, PluginContext&) - throw (castor::exception::Exception) {}; + {}; private: diff --git a/castor/legacymsg/CommonMarshal.cpp b/castor/legacymsg/CommonMarshal.cpp index 20b1a3fbab3194f99fe486872e37ce8bab3fc815..543aa84f2287f2e0a6878d598d92a6783c17ea8a 100644 --- a/castor/legacymsg/CommonMarshal.cpp +++ b/castor/legacymsg/CommonMarshal.cpp @@ -36,7 +36,7 @@ // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const MessageHeader &src) throw(castor::exception::Exception) { + const MessageHeader &src) { if(dst == NULL) { castor::exception::Exception ex; @@ -82,7 +82,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, - MessageHeader &dst) throw(castor::exception::Exception) { + MessageHeader &dst) { io::unmarshalUint32(src, srcLen, dst.magic); io::unmarshalUint32(src, srcLen, dst.reqType); diff --git a/castor/legacymsg/CommonMarshal.hpp b/castor/legacymsg/CommonMarshal.hpp index 88050e14f0d0a09f9df0eba7d3607b825ba83e53..62c9f0c46a61b6f458f9714465034d5b6fc83533 100644 --- a/castor/legacymsg/CommonMarshal.hpp +++ b/castor/legacymsg/CommonMarshal.hpp @@ -47,7 +47,7 @@ namespace legacymsg { * @return The total length of the header. */ size_t marshal(char *const dst, const size_t dstLen, - const MessageHeader &src) throw(castor::exception::Exception); + const MessageHeader &src) ; /** * Marshals the specified source message header structure into the @@ -58,7 +58,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the header. */ template<int n> size_t marshal(char (&dst)[n], - const MessageHeader &src) throw(castor::exception::Exception) { + const MessageHeader &src) { return marshal(dst, n, src); } @@ -77,7 +77,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination structure. */ void unmarshal(const char * &src, size_t &srcLen, MessageHeader &dst) - throw(castor::exception::Exception); + ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/CupvMarshal.cpp b/castor/legacymsg/CupvMarshal.cpp index 8a54928e235c25e6c2d963ab4aa0dc0e29a4a986..d63eb7bf8c333376124d2852ce02dfc3a20dd541 100644 --- a/castor/legacymsg/CupvMarshal.cpp +++ b/castor/legacymsg/CupvMarshal.cpp @@ -33,7 +33,7 @@ //----------------------------------------------------------------------------- // marshal //----------------------------------------------------------------------------- -size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const CupvCheckMsgBody &src) throw(castor::exception::Exception) { +size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const CupvCheckMsgBody &src) { if(dst == NULL) { castor::exception::Exception ex; @@ -96,7 +96,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const Cu //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, CupvCheckMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, CupvCheckMsgBody &dst) { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); io::unmarshalUint32(src, srcLen, dst.privUid); diff --git a/castor/legacymsg/CupvMarshal.hpp b/castor/legacymsg/CupvMarshal.hpp index b2f5cd72270bfaee5b534ba04ba1c35fcfa19ea7..159cb4fa498388edad29602b6a5b963ee52089a5 100644 --- a/castor/legacymsg/CupvMarshal.hpp +++ b/castor/legacymsg/CupvMarshal.hpp @@ -41,7 +41,7 @@ namespace legacymsg { * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const CupvCheckMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const CupvCheckMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -51,7 +51,7 @@ size_t marshal(char *const dst, const size_t dstLen, const CupvCheckMsgBody &src * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const CupvCheckMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const CupvCheckMsgBody &src) { return marshal(dst, n, src); } @@ -68,7 +68,7 @@ template<int n> size_t marshal(char (&dst)[n], const CupvCheckMsgBody &src) thro * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, CupvCheckMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, CupvCheckMsgBody &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/CupvProxy.hpp b/castor/legacymsg/CupvProxy.hpp index 34748d86a4d05163e29bf261de0d093209468795..84d1df9f552058980d426cc36aaf6a04048b9aa5 100644 --- a/castor/legacymsg/CupvProxy.hpp +++ b/castor/legacymsg/CupvProxy.hpp @@ -57,7 +57,7 @@ public: const gid_t privGid, const std::string &srcHost, const std::string &tgtHost, - const int priv) throw(castor::exception::Exception) = 0; + const int priv) = 0; }; // class CupvProxy diff --git a/castor/legacymsg/CupvProxyDummy.cpp b/castor/legacymsg/CupvProxyDummy.cpp index cb1e77e225bcba4cffe6d72e1d5d199159bb7132..07661dff06f9b2ca44ad4ca1f7532e2723931cb7 100644 --- a/castor/legacymsg/CupvProxyDummy.cpp +++ b/castor/legacymsg/CupvProxyDummy.cpp @@ -46,6 +46,6 @@ bool castor::legacymsg::CupvProxyDummy::isGranted( const gid_t privGid, const std::string &srcHost, const std::string &tgtHost, - const int priv) throw(castor::exception::Exception) { + const int priv) { return m_isGrantedReturnValue; } diff --git a/castor/legacymsg/CupvProxyDummy.hpp b/castor/legacymsg/CupvProxyDummy.hpp index 70ee6a3f3919514e5615254b1568c65f4f09acc3..79948f189d41e8c91778f68b0fd702a77370fe15 100644 --- a/castor/legacymsg/CupvProxyDummy.hpp +++ b/castor/legacymsg/CupvProxyDummy.hpp @@ -66,7 +66,7 @@ public: const gid_t privGid, const std::string &srcHost, const std::string &tgtHost, - const int priv) throw(castor::exception::Exception); + const int priv) ; private: diff --git a/castor/legacymsg/CupvProxyTcpIp.cpp b/castor/legacymsg/CupvProxyTcpIp.cpp index 1e6d8484be727ae28e9b91f44f17709479df682a..9c11625ac52682510899c943e0087ea7656d24e3 100644 --- a/castor/legacymsg/CupvProxyTcpIp.cpp +++ b/castor/legacymsg/CupvProxyTcpIp.cpp @@ -59,7 +59,7 @@ bool castor::legacymsg::CupvProxyTcpIp::isGranted( const gid_t privGid, const std::string &srcHost, const std::string &tgtHost, - const int priv) throw(castor::exception::Exception) { + const int priv) { std::ostringstream task; task << "check privilege privUid=" << privUid << " privGid=" << privGid << " srcHost=" << srcHost << " tgtHost=" << tgtHost << " priv=" << priv; @@ -124,7 +124,7 @@ bool castor::legacymsg::CupvProxyTcpIp::isGranted( //----------------------------------------------------------------------------- // connectToCupv //----------------------------------------------------------------------------- -int castor::legacymsg::CupvProxyTcpIp::connectToCupv() const throw(castor::exception::Exception) { +int castor::legacymsg::CupvProxyTcpIp::connectToCupv() const { castor::utils::SmartFd smartConnectSock; try { smartConnectSock.reset(io::connectWithTimeout(m_cupvHostName, m_cupvPort, @@ -142,7 +142,7 @@ int castor::legacymsg::CupvProxyTcpIp::connectToCupv() const throw(castor::excep //----------------------------------------------------------------------------- // writeCupvCheckMsg //----------------------------------------------------------------------------- -void castor::legacymsg::CupvProxyTcpIp::writeCupvCheckMsg(const int fd, const legacymsg::CupvCheckMsgBody &body) throw(castor::exception::Exception) { +void castor::legacymsg::CupvProxyTcpIp::writeCupvCheckMsg(const int fd, const legacymsg::CupvCheckMsgBody &body) { char buf[REQBUFSZ]; const size_t len = legacymsg::marshal(buf, body); @@ -159,7 +159,7 @@ void castor::legacymsg::CupvProxyTcpIp::writeCupvCheckMsg(const int fd, const le //----------------------------------------------------------------------------- // readCupvMsgHeader //----------------------------------------------------------------------------- -castor::legacymsg::MessageHeader castor::legacymsg::CupvProxyTcpIp::readCupvMsgHeader(const int fd) throw(castor::exception::Exception) { +castor::legacymsg::MessageHeader castor::legacymsg::CupvProxyTcpIp::readCupvMsgHeader(const int fd) { char buf[12]; // Magic + type + len MessageHeader header; diff --git a/castor/legacymsg/CupvProxyTcpIp.hpp b/castor/legacymsg/CupvProxyTcpIp.hpp index 63c02f168f0f8a62d6c11b3d301068b0017dd434..3eff9fadb931c73a2b64c824b13c35438b0992b6 100644 --- a/castor/legacymsg/CupvProxyTcpIp.hpp +++ b/castor/legacymsg/CupvProxyTcpIp.hpp @@ -74,7 +74,7 @@ public: const gid_t privGid, const std::string &srcHost, const std::string &tgtHost, - const int privilege) throw(castor::exception::Exception); + const int privilege) ; private: @@ -104,7 +104,7 @@ private: * * @return The socket-descriptor of the connection with the vdqmd daemon. */ - int connectToCupv() const throw(castor::exception::Exception); + int connectToCupv() const ; /** * Writes a CUPV_CHECK message with the specifed contents to the specified @@ -112,7 +112,7 @@ private: * * @param body The message body. */ - void writeCupvCheckMsg(const int fd, const CupvCheckMsgBody &body) throw(castor::exception::Exception); + void writeCupvCheckMsg(const int fd, const CupvCheckMsgBody &body) ; /** * Reads the header of an CUPV_MAGIC message from the specified connection. @@ -120,7 +120,7 @@ private: * @param fd The file descriptor of the connection. * @return The message header. */ - MessageHeader readCupvMsgHeader(const int fd) throw(castor::exception::Exception); + MessageHeader readCupvMsgHeader(const int fd) ; }; // class CupvProxyTcpIp diff --git a/castor/legacymsg/GenericMarshal.cpp b/castor/legacymsg/GenericMarshal.cpp index 7b9651a69d2747b86b25de3ce076452aec718575..870f4573e4b0cbc0af802f94f67cf8b2831740da 100644 --- a/castor/legacymsg/GenericMarshal.cpp +++ b/castor/legacymsg/GenericMarshal.cpp @@ -34,7 +34,7 @@ //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const uint32_t srcMagic, const uint32_t srcReqType, - const GenericReplyMsgBody &srcBody) throw(castor::exception::Exception) { + const GenericReplyMsgBody &srcBody) { const char *const task = "marshal GenericReplyMsgBody"; if(dst == NULL) { @@ -107,7 +107,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, - GenericReplyMsgBody &dst) throw(castor::exception::Exception) { + GenericReplyMsgBody &dst) { try { io::unmarshalUint32(src, srcLen, dst.status); io::unmarshalString(src, srcLen, dst.errorMessage); diff --git a/castor/legacymsg/GenericMarshal.hpp b/castor/legacymsg/GenericMarshal.hpp index 8ae8e359bb842c461078887a413c5a840ee055cd..ec456b41f52cb06b6d0e0e8c6ef03725cfb61bb4 100644 --- a/castor/legacymsg/GenericMarshal.hpp +++ b/castor/legacymsg/GenericMarshal.hpp @@ -49,7 +49,7 @@ namespace legacymsg { */ size_t marshal(char *const dst, const size_t dstLen, const uint32_t srcMagic, const uint32_t srcReqType, const GenericReplyMsgBody &srcBody) - throw(castor::exception::Exception); + ; /** * Marshals the specified source message into the specified destination buffer. @@ -65,7 +65,7 @@ size_t marshal(char *const dst, const size_t dstLen, const uint32_t srcMagic, */ template<int n> size_t marshal(char (&dst)[n], const uint32_t srcMagic, const uint32_t srcReqType, const GenericReplyMsgBody &srcBody) - throw(castor::exception::Exception) { + { return marshal(dst, n, srcMagic, srcReqType, srcBody); } @@ -82,7 +82,7 @@ template<int n> size_t marshal(char (&dst)[n], const uint32_t srcMagic, * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, GenericReplyMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, GenericReplyMsgBody &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/RmcMarshal.cpp b/castor/legacymsg/RmcMarshal.cpp index 1e25c9e93440dd5c48ed4059769ea524ba5a8b68..333180578834ddcb877a03669f6eb5183c8b2c96 100644 --- a/castor/legacymsg/RmcMarshal.cpp +++ b/castor/legacymsg/RmcMarshal.cpp @@ -33,7 +33,7 @@ //----------------------------------------------------------------------------- // marshal //----------------------------------------------------------------------------- -size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RmcAcsMntMsgBody &src) throw(castor::exception::Exception) { +size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RmcAcsMntMsgBody &src) { const char *task = "marshal RmcAcsMntMsgBody"; if(dst == NULL) { @@ -117,7 +117,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const Rm //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcAcsMntMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcAcsMntMsgBody &dst) { try { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); @@ -137,7 +137,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcAcsMntMs //----------------------------------------------------------------------------- // marshal //----------------------------------------------------------------------------- -size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RmcMountMsgBody &src) throw(castor::exception::Exception) { +size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RmcMountMsgBody &src) { const char *task = "marshal RmcMountMsgBody"; if(dst == NULL) { @@ -219,7 +219,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const Rm //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcMountMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcMountMsgBody &dst) { try { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); @@ -238,7 +238,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcMountMsg //----------------------------------------------------------------------------- // marshal //----------------------------------------------------------------------------- -size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RmcUnmountMsgBody &src) throw(castor::exception::Exception) { +size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RmcUnmountMsgBody &src) { const char *const task = "marshal RmcUnmountMsgBody"; if(dst == NULL) { @@ -320,7 +320,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const Rm //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcUnmountMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RmcUnmountMsgBody &dst) { try { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); diff --git a/castor/legacymsg/RmcMarshal.hpp b/castor/legacymsg/RmcMarshal.hpp index cd4e64118407a954ab45f1bffc44baf660405c08..839b7e4589d90e8c576b3e2385e8001c550fd4db 100644 --- a/castor/legacymsg/RmcMarshal.hpp +++ b/castor/legacymsg/RmcMarshal.hpp @@ -42,7 +42,7 @@ namespace legacymsg { * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const RmcAcsMntMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const RmcAcsMntMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -52,7 +52,7 @@ size_t marshal(char *const dst, const size_t dstLen, const RmcAcsMntMsgBody &src * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const RmcAcsMntMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const RmcAcsMntMsgBody &src) { return marshal(dst, n, src); } @@ -69,7 +69,7 @@ template<int n> size_t marshal(char (&dst)[n], const RmcAcsMntMsgBody &src) thro * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, RmcAcsMntMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, RmcAcsMntMsgBody &dst) ; /** * Marshals the specified source message body structure and its implicit @@ -80,7 +80,7 @@ void unmarshal(const char * &src, size_t &srcLen, RmcAcsMntMsgBody &dst) throw(c * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const RmcMountMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const RmcMountMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -90,7 +90,7 @@ size_t marshal(char *const dst, const size_t dstLen, const RmcMountMsgBody &src) * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const RmcMountMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const RmcMountMsgBody &src) { return marshal(dst, n, src); } @@ -107,7 +107,7 @@ template<int n> size_t marshal(char (&dst)[n], const RmcMountMsgBody &src) throw * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, RmcMountMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, RmcMountMsgBody &dst) ; /** * Marshals the specified source message body structure and its implicit @@ -118,7 +118,7 @@ void unmarshal(const char * &src, size_t &srcLen, RmcMountMsgBody &dst) throw(ca * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const RmcUnmountMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const RmcUnmountMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -128,7 +128,7 @@ size_t marshal(char *const dst, const size_t dstLen, const RmcUnmountMsgBody &sr * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const RmcUnmountMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const RmcUnmountMsgBody &src) { return marshal(dst, n, src); } @@ -145,7 +145,7 @@ template<int n> size_t marshal(char (&dst)[n], const RmcUnmountMsgBody &src) thr * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, RmcUnmountMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, RmcUnmountMsgBody &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/RmcProxy.hpp b/castor/legacymsg/RmcProxy.hpp index 4e7e5275a02ad60eb8b5662b1c485c4a1922440e..2591642922c23b94093bc28313135b640c54ff86 100644 --- a/castor/legacymsg/RmcProxy.hpp +++ b/castor/legacymsg/RmcProxy.hpp @@ -49,7 +49,7 @@ public: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER", * "manual" or "smc@rmc_host,drive_ordinal". */ - virtual void mountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) = 0; + virtual void mountTape(const std::string &vid, const std::string &librarySlot) = 0; /** * Asks the remote media-changer daemon to unmount the specified tape from the @@ -60,7 +60,7 @@ public: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER", * "manual" or "smc@rmc_host,drive_ordinal". */ - virtual void unmountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) = 0; + virtual void unmountTape(const std::string &vid, const std::string &librarySlot) = 0; }; // class RmcProxy diff --git a/castor/legacymsg/RmcProxyDummy.cpp b/castor/legacymsg/RmcProxyDummy.cpp index 3147b52746f0cf6c78ff7cfaed9ef26499727126..6e23c25bc04b2618ef1a0ebe66618b0f7fe2b355 100644 --- a/castor/legacymsg/RmcProxyDummy.cpp +++ b/castor/legacymsg/RmcProxyDummy.cpp @@ -31,11 +31,11 @@ castor::legacymsg::RmcProxyDummy::~RmcProxyDummy() throw() { //------------------------------------------------------------------------------ // mountTape //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyDummy::mountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyDummy::mountTape(const std::string &vid, const std::string &librarySlot) { } //------------------------------------------------------------------------------ // unmountTape //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyDummy::unmountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyDummy::unmountTape(const std::string &vid, const std::string &librarySlot) { } diff --git a/castor/legacymsg/RmcProxyDummy.hpp b/castor/legacymsg/RmcProxyDummy.hpp index bea9710f7119d8d6cdb0677fddbda4ab65ee412d..7b2403bfb59bf6a33b2abfa64321ec666c2fe26f 100644 --- a/castor/legacymsg/RmcProxyDummy.hpp +++ b/castor/legacymsg/RmcProxyDummy.hpp @@ -49,7 +49,7 @@ public: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER", * "manual" or "smc@rmc_host,drive_ordinal". */ - void mountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void mountTape(const std::string &vid, const std::string &librarySlot) ; /** * Asks the remote media-changer daemon to unmount the specified tape from the @@ -60,7 +60,7 @@ public: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER", * "manual" or "smc@rmc_host,drive_ordinal". */ - void unmountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void unmountTape(const std::string &vid, const std::string &librarySlot) ; }; // class RmcProxyDummy diff --git a/castor/legacymsg/RmcProxyTcpIp.cpp b/castor/legacymsg/RmcProxyTcpIp.cpp index d26978f38b170cc39d02bb1d281e723b60faadce..bbef301bdbbf0883a2bb06bb734aed5617e4b025 100644 --- a/castor/legacymsg/RmcProxyTcpIp.cpp +++ b/castor/legacymsg/RmcProxyTcpIp.cpp @@ -49,7 +49,7 @@ castor::legacymsg::RmcProxyTcpIp::~RmcProxyTcpIp() throw() { //------------------------------------------------------------------------------ // mountTape //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::mountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::mountTape(const std::string &vid, const std::string &librarySlot) { // Verify parameters if(vid.empty()) { castor::exception::Exception ex; @@ -108,19 +108,19 @@ castor::legacymsg::RmcProxyTcpIp::RmcLibrarySlotType castor::legacymsg::RmcProxy //------------------------------------------------------------------------------ // mountTapeAcs //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::mountTapeAcs(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::mountTapeAcs(const std::string &vid, const std::string &librarySlot) { } //------------------------------------------------------------------------------ // mountTapeManual //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::mountTapeManual(const std::string &vid) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::mountTapeManual(const std::string &vid) { } //------------------------------------------------------------------------------ // mountTapeScsi //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::mountTapeScsi(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::mountTapeScsi(const std::string &vid, const std::string &librarySlot) { std::ostringstream task; task << "mount tape " << vid << " in " << librarySlot; @@ -179,7 +179,7 @@ void castor::legacymsg::RmcProxyTcpIp::mountTapeScsi(const std::string &vid, con //------------------------------------------------------------------------------ // unmountTape //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::unmountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::unmountTape(const std::string &vid, const std::string &librarySlot) { // Verify parameters if(vid.empty()) { castor::exception::Exception ex; @@ -223,19 +223,19 @@ void castor::legacymsg::RmcProxyTcpIp::unmountTape(const std::string &vid, const //------------------------------------------------------------------------------ // unmountTapeAcs //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::unmountTapeAcs(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::unmountTapeAcs(const std::string &vid, const std::string &librarySlot) { } //------------------------------------------------------------------------------ // unmountTapeManual //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::unmountTapeManual(const std::string &vid) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::unmountTapeManual(const std::string &vid) { } //------------------------------------------------------------------------------ // unmountTapeScsi //------------------------------------------------------------------------------ -void castor::legacymsg::RmcProxyTcpIp::unmountTapeScsi(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception) { +void castor::legacymsg::RmcProxyTcpIp::unmountTapeScsi(const std::string &vid, const std::string &librarySlot) { std::ostringstream task; task << "unmount tape " << vid << " from " << librarySlot; @@ -295,7 +295,7 @@ void castor::legacymsg::RmcProxyTcpIp::unmountTapeScsi(const std::string &vid, c //----------------------------------------------------------------------------- // connectToRmc //----------------------------------------------------------------------------- -int castor::legacymsg::RmcProxyTcpIp::connectToRmc(const std::string &hostName) const throw(castor::exception::Exception) { +int castor::legacymsg::RmcProxyTcpIp::connectToRmc(const std::string &hostName) const { castor::utils::SmartFd smartConnectSock; try { smartConnectSock.reset(io::connectWithTimeout(hostName, RMC_PORT, m_netTimeout)); @@ -313,7 +313,7 @@ int castor::legacymsg::RmcProxyTcpIp::connectToRmc(const std::string &hostName) // writeRmcMountMsg //----------------------------------------------------------------------------- void castor::legacymsg::RmcProxyTcpIp::writeRmcMountMsg(const int fd, const RmcMountMsgBody &body) - throw(castor::exception::Exception) { + { char buf[RMC_MSGBUFSIZ]; const size_t len = marshal(buf, body); @@ -330,7 +330,7 @@ void castor::legacymsg::RmcProxyTcpIp::writeRmcMountMsg(const int fd, const RmcM //----------------------------------------------------------------------------- // readRmcMsgHeader //----------------------------------------------------------------------------- -castor::legacymsg::MessageHeader castor::legacymsg::RmcProxyTcpIp::readRmcMsgHeader(const int fd) throw(castor::exception::Exception) { +castor::legacymsg::MessageHeader castor::legacymsg::RmcProxyTcpIp::readRmcMsgHeader(const int fd) { char buf[12]; // Magic + type + len MessageHeader header; @@ -362,7 +362,7 @@ castor::legacymsg::MessageHeader castor::legacymsg::RmcProxyTcpIp::readRmcMsgHea // writeRmcUnmountMsg //----------------------------------------------------------------------------- void castor::legacymsg::RmcProxyTcpIp::writeRmcUnmountMsg(const int fd, const RmcUnmountMsgBody &body) - throw(castor::exception::Exception) { + { char buf[RMC_MSGBUFSIZ]; const size_t len = marshal(buf, body); diff --git a/castor/legacymsg/RmcProxyTcpIp.hpp b/castor/legacymsg/RmcProxyTcpIp.hpp index 9f3d9fe7ebcdc694de6f52f70953ca92da4ad7f3..1e4b78e3fd90d641c5a081a7b777bb452c93d3b9 100644 --- a/castor/legacymsg/RmcProxyTcpIp.hpp +++ b/castor/legacymsg/RmcProxyTcpIp.hpp @@ -63,7 +63,7 @@ public: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER", * "manual" or "smc@rmc_host,drive_ordinal". */ - void mountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void mountTape(const std::string &vid, const std::string &librarySlot) ; /** * Asks the remote media-changer daemon to unmount the specified tape from the @@ -74,7 +74,7 @@ public: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER", * "manual" or "smc@rmc_host,drive_ordinal". */ - void unmountTape(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void unmountTape(const std::string &vid, const std::string &librarySlot) ; /** * Enumeration of the different types of library slot. @@ -131,14 +131,14 @@ protected: * @param librarySlot The library slot in the following form: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER". */ - void mountTapeAcs(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void mountTapeAcs(const std::string &vid, const std::string &librarySlot) ; /** * Logs a request to the tape-operator to manually mount the specified tape. * * @param vid The volume identifier of the tape. */ - void mountTapeManual(const std::string &vid) throw(castor::exception::Exception); + void mountTapeManual(const std::string &vid) ; /** * Asks the remote media-changer daemon to mount the specified tape into the @@ -148,7 +148,7 @@ protected: * @param librarySlot The library slot in the following form: * "smc@rmc_host,drive_ordinal". */ - void mountTapeScsi(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void mountTapeScsi(const std::string &vid, const std::string &librarySlot) ; /** * Asks the remote media-changer daemon to unmount the specified tape from the @@ -158,14 +158,14 @@ protected: * @param librarySlot The library slot in the following form: * "acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER". */ - void unmountTapeAcs(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void unmountTapeAcs(const std::string &vid, const std::string &librarySlot) ; /** * Logs a request to the tape-operator to manually unmount the specified tape. * * @param vid The volume identifier of the tape. */ - void unmountTapeManual(const std::string &vid) throw(castor::exception::Exception); + void unmountTapeManual(const std::string &vid) ; /** * Asks the remote media-changer daemon to unmount the specified tape from the @@ -175,7 +175,7 @@ protected: * @param librarySlot The library slot in the following form: * "smc@rmc_host,drive_ordinal". */ - void unmountTapeScsi(const std::string &vid, const std::string &librarySlot) throw(castor::exception::Exception); + void unmountTapeScsi(const std::string &vid, const std::string &librarySlot) ; /** * Connects to the rmcd daemon. @@ -183,7 +183,7 @@ protected: * @param hostName The name of the host on which the rmcd daemon is running. * @return The socket-descriptor of the connection with the rmcd daemon. */ - int connectToRmc(const std::string &hostName) const throw(castor::exception::Exception); + int connectToRmc(const std::string &hostName) const ; /** * Writes an RMC_SCSI_MOUNT message with the specifed body to the specified @@ -192,7 +192,7 @@ protected: * @param fd The file descriptor of the connection. * @param body The body of the message. */ - void writeRmcMountMsg(const int fd, const RmcMountMsgBody &body) throw(castor::exception::Exception); + void writeRmcMountMsg(const int fd, const RmcMountMsgBody &body) ; /** * Reads the header of an RMC_MAGIC message from the specified connection. @@ -200,7 +200,7 @@ protected: * @param fd The file descriptor of the connection. * @return The message header. */ - MessageHeader readRmcMsgHeader(const int fd) throw(castor::exception::Exception); + MessageHeader readRmcMsgHeader(const int fd) ; /** * Writes an RMC_SCSI_UNMOUNT message with the specifed body to the specified @@ -209,7 +209,7 @@ protected: * @param fd The file descriptor of the connection. * @param body The body of the message. */ - void writeRmcUnmountMsg(const int fd, const RmcUnmountMsgBody &body) throw(castor::exception::Exception); + void writeRmcUnmountMsg(const int fd, const RmcUnmountMsgBody &body) ; }; // class RmcProxyTcpIp diff --git a/castor/legacymsg/RtcpMarshal.cpp b/castor/legacymsg/RtcpMarshal.cpp index 2d3008a62a840c97dff8e50e58be28fc559386d0..80ef8358d30955509827ba6d808fb01066a870d8 100644 --- a/castor/legacymsg/RtcpMarshal.cpp +++ b/castor/legacymsg/RtcpMarshal.cpp @@ -39,7 +39,7 @@ // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const RtcpJobRqstMsgBody &src) throw(castor::exception::Exception) { + const RtcpJobRqstMsgBody &src) { if(dst == NULL) { castor::exception::Exception ex; @@ -103,7 +103,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, - size_t &srcLen, RtcpJobRqstMsgBody &dst) throw(castor::exception::Exception) { + size_t &srcLen, RtcpJobRqstMsgBody &dst) { io::unmarshalUint32(src, srcLen, dst.volReqId); io::unmarshalUint32(src, srcLen, dst.clientPort); @@ -121,7 +121,7 @@ void castor::legacymsg::unmarshal(const char * &src, //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const RtcpJobReplyMsgBody &src) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex; @@ -186,7 +186,7 @@ size_t castor::legacymsg::marshal(char *const dst, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, - RtcpJobReplyMsgBody &dst) throw(castor::exception::Exception) { + RtcpJobReplyMsgBody &dst) { // Unmarshal the status number io::unmarshalInt32(src, srcLen, dst.status); @@ -212,7 +212,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, - const RtcpTapeRqstErrMsgBody &src) throw(castor::exception::Exception) { + const RtcpTapeRqstErrMsgBody &src) { if(dst == NULL) { castor::exception::Exception ex; @@ -309,7 +309,7 @@ size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, - RtcpTapeRqstErrMsgBody &dst) throw(castor::exception::Exception) { + RtcpTapeRqstErrMsgBody &dst) { unmarshal(src, srcLen, (RtcpTapeRqstMsgBody&)dst); io::unmarshalString(src, srcLen, dst.err.errorMsg); @@ -324,7 +324,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, - RtcpTapeRqstMsgBody &dst) throw(castor::exception::Exception) { + RtcpTapeRqstMsgBody &dst) { io::unmarshalString(src, srcLen, dst.vid); io::unmarshalString(src, srcLen, dst.vsn); @@ -364,7 +364,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, - const RtcpFileRqstErrMsgBody &src) throw(castor::exception::Exception) { + const RtcpFileRqstErrMsgBody &src) { if(dst == NULL) { castor::exception::Exception ex; @@ -504,7 +504,7 @@ size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RtcpFileRqstErrMsgBody &dst) - throw(castor::exception::Exception) { + { unmarshal(src, srcLen, (RtcpFileRqstMsgBody&)dst); io::unmarshalString(src, srcLen, dst.err.errorMsg); io::unmarshalUint32(src, srcLen, dst.err.severity); @@ -519,7 +519,7 @@ void castor::legacymsg::unmarshal(const char * &src, //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, RtcpFileRqstMsgBody &dst) - throw(castor::exception::Exception) { + { io::unmarshalString(src, srcLen, dst.rqst.filePath); io::unmarshalString(src, srcLen, dst.rqst.tapePath); @@ -585,7 +585,7 @@ void castor::legacymsg::unmarshal(const char * &src, // unmarshal //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, - size_t &srcLen, GiveOutpMsgBody &dst) throw(castor::exception::Exception) { + size_t &srcLen, GiveOutpMsgBody &dst) { io::unmarshalString(src, srcLen, dst.message); } @@ -595,7 +595,7 @@ void castor::legacymsg::unmarshal(const char * &src, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, - const RtcpNoMoreRequestsMsgBody&) throw(castor::exception::Exception) { + const RtcpNoMoreRequestsMsgBody&) { if(dst == NULL) { castor::exception::Exception ex; @@ -645,7 +645,7 @@ size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *dst, const size_t dstLen, - const RtcpDumpTapeRqstMsgBody &src) throw(castor::exception::Exception) { + const RtcpDumpTapeRqstMsgBody &src) { if(dst == NULL) { castor::exception::Exception ex; diff --git a/castor/legacymsg/RtcpMarshal.hpp b/castor/legacymsg/RtcpMarshal.hpp index df5d4966e233f15dfdb45f874e6ddb6b5d48da6a..a7426d36299d5a76f7efdb5d343de41aad976194 100644 --- a/castor/legacymsg/RtcpMarshal.hpp +++ b/castor/legacymsg/RtcpMarshal.hpp @@ -54,7 +54,7 @@ namespace legacymsg { * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const RtcpJobRqstMsgBody &src) throw(castor::exception::Exception); + const RtcpJobRqstMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -65,7 +65,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const RtcpJobRqstMsgBody &src) throw(castor::exception::Exception) { + const RtcpJobRqstMsgBody &src) { return marshal(dst, n, src); } @@ -83,7 +83,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - RtcpJobRqstMsgBody &dst) throw(castor::exception::Exception); + RtcpJobRqstMsgBody &dst) ; /** * Marshalls the specified source message body structure into the @@ -95,7 +95,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const RtcpJobReplyMsgBody &src) throw(castor::exception::Exception); + const RtcpJobReplyMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -106,7 +106,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const RtcpJobReplyMsgBody &src) throw(castor::exception::Exception) { + const RtcpJobReplyMsgBody &src) { return marshal(dst, n, src); } @@ -124,7 +124,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - RtcpJobReplyMsgBody &dst) throw(castor::exception::Exception); + RtcpJobReplyMsgBody &dst) ; /** * Marshalls the specified source message body structure into the @@ -136,7 +136,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const RtcpTapeRqstErrMsgBody &src) throw(castor::exception::Exception); + const RtcpTapeRqstErrMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -147,7 +147,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const RtcpTapeRqstErrMsgBody &src) throw(castor::exception::Exception) { + const RtcpTapeRqstErrMsgBody &src) { return marshal(dst, n, src); } @@ -165,7 +165,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - RtcpTapeRqstErrMsgBody &dst) throw(castor::exception::Exception); + RtcpTapeRqstErrMsgBody &dst) ; /** * Unmarshals a message body with the specified destination structure type @@ -181,7 +181,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - RtcpTapeRqstMsgBody &dst) throw(castor::exception::Exception); + RtcpTapeRqstMsgBody &dst) ; /** * Marshalls the specified source message body structure into the @@ -193,7 +193,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const RtcpFileRqstErrMsgBody &src) throw(castor::exception::Exception); + const RtcpFileRqstErrMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -204,7 +204,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const RtcpFileRqstErrMsgBody &src) throw(castor::exception::Exception) { + const RtcpFileRqstErrMsgBody &src) { return marshal(dst, n, src); } @@ -222,7 +222,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - RtcpFileRqstErrMsgBody &dst) throw(castor::exception::Exception); + RtcpFileRqstErrMsgBody &dst) ; /** * Unmarshals a message body with the specified destination structure type @@ -238,7 +238,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - RtcpFileRqstMsgBody &dst) throw(castor::exception::Exception); + RtcpFileRqstMsgBody &dst) ; /** * Unmarshals a message body with the specified destination structure type @@ -254,7 +254,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - GiveOutpMsgBody &dst) throw(castor::exception::Exception); + GiveOutpMsgBody &dst) ; /** * Marshalls the specified source message body structure into the @@ -266,7 +266,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const RtcpNoMoreRequestsMsgBody &src) throw(castor::exception::Exception); + const RtcpNoMoreRequestsMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -278,7 +278,7 @@ size_t marshal(char *const dst, const size_t dstLen, */ template<int n> size_t marshal(char (&dst)[n], const RtcpNoMoreRequestsMsgBody &src) - throw(castor::exception::Exception) { + { return marshal(dst, n, src); } @@ -292,7 +292,7 @@ template<int n> size_t marshal(char (&dst)[n], * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const RtcpDumpTapeRqstMsgBody &src) throw(castor::exception::Exception); + const RtcpDumpTapeRqstMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -303,7 +303,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const RtcpDumpTapeRqstMsgBody &src) throw(castor::exception::Exception) { + const RtcpDumpTapeRqstMsgBody &src) { return marshal(dst, n, src); } diff --git a/castor/legacymsg/ScsiLibrarySlot.cpp b/castor/legacymsg/ScsiLibrarySlot.cpp index 58100d374ff26493eac5b164a2d88a7ebb1f0542..abf103b0dfe7855887a8e6baaf05339486e67f37 100644 --- a/castor/legacymsg/ScsiLibrarySlot.cpp +++ b/castor/legacymsg/ScsiLibrarySlot.cpp @@ -34,7 +34,7 @@ castor::legacymsg::ScsiLibrarySlot::ScsiLibrarySlot() // constructor //------------------------------------------------------------------------------ castor::legacymsg::ScsiLibrarySlot::ScsiLibrarySlot( - const std::string &str) throw(castor::exception::Exception): drvOrd(0) { + const std::string &str) : drvOrd(0) { if(str.find("smc@")) { castor::exception::Exception ex; ex.getMessage() << "Failed to construct ScsiLibrarySlot" diff --git a/castor/legacymsg/ScsiLibrarySlot.hpp b/castor/legacymsg/ScsiLibrarySlot.hpp index 4bdcf471bc8acf3f6792a43f74740ef1929f1505..1455daa5fa830b07ead4fc624cb4c54085fa73c5 100644 --- a/castor/legacymsg/ScsiLibrarySlot.hpp +++ b/castor/legacymsg/ScsiLibrarySlot.hpp @@ -61,7 +61,7 @@ public: * * @param str The string representation of a SCSI library slot. */ - ScsiLibrarySlot(const std::string &str) throw(castor::exception::Exception); + ScsiLibrarySlot(const std::string &str) ; }; // class ScsiLibrarySlot } // namespace legacymsg diff --git a/castor/legacymsg/TapeBridgeMarshal.cpp b/castor/legacymsg/TapeBridgeMarshal.cpp index 62f08969c5235a36509c2f1a73e650192e5d000d..ece5002c694fc480bab202346424cb59f44fe64c 100644 --- a/castor/legacymsg/TapeBridgeMarshal.cpp +++ b/castor/legacymsg/TapeBridgeMarshal.cpp @@ -40,7 +40,7 @@ //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, tapeBridgeFlushedToTapeMsgBody_t &dst) - throw(castor::exception::Exception) { + { io::unmarshalUint32(src, srcLen, dst.volReqId); io::unmarshalUint32(src, srcLen, dst.tapeFseq); diff --git a/castor/legacymsg/TapeBridgeMarshal.hpp b/castor/legacymsg/TapeBridgeMarshal.hpp index 48d05bc6fc69e03c5c6633990d7546ef25eb29b6..58c507ba0118f03a216f0a1e1ca7c39a80aa2622 100644 --- a/castor/legacymsg/TapeBridgeMarshal.hpp +++ b/castor/legacymsg/TapeBridgeMarshal.hpp @@ -50,7 +50,7 @@ namespace legacymsg { * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - tapeBridgeFlushedToTapeMsgBody_t &dst) throw(castor::exception::Exception); + tapeBridgeFlushedToTapeMsgBody_t &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/TapeMarshal.cpp b/castor/legacymsg/TapeMarshal.cpp index beaf1c2f2433f5369476c28b2cd7f9ee63afc8a6..e2a49292405db2c07d3adfc184addb1a52a612e5 100644 --- a/castor/legacymsg/TapeMarshal.cpp +++ b/castor/legacymsg/TapeMarshal.cpp @@ -39,7 +39,7 @@ // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const TapeStatRequestMsgBody &src) throw(castor::exception::Exception) { + const TapeStatRequestMsgBody &src) { const char *const task = "marshal TapeStatRequestMsgBody"; if(dst == NULL) { @@ -114,7 +114,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const TapeStatReplyMsgBody &body) throw(castor::exception::Exception) { + const TapeStatReplyMsgBody &body) { const char *const task = "marshall TapeStatReplyMsgBody"; if(dst == NULL) { @@ -218,7 +218,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const TapeConfigRequestMsgBody &src) throw(castor::exception::Exception) { + const TapeConfigRequestMsgBody &src) { const char *const task = "marshal TapeConfigRequestMsgBody"; if(dst == NULL) { @@ -297,7 +297,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const TapeLabelRqstMsgBody &src) throw(castor::exception::Exception) { + const TapeLabelRqstMsgBody &src) { const char *const task = "marshal TapeLabelRqstMsgBody"; if(dst == NULL) { @@ -379,7 +379,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, //----------------------------------------------------------------------------- // marshal //----------------------------------------------------------------------------- -size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const TapeUpdateDriveRqstMsgBody &src) throw(castor::exception::Exception) { +size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const TapeUpdateDriveRqstMsgBody &src) { const char *task = "marshal TapeUpdateDriveRqstMsgBody"; if(dst == NULL) { @@ -453,7 +453,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const Ta //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeStatReplyMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeStatReplyMsgBody &dst) { try { io::unmarshalUint16(src, srcLen, dst.number_of_drives); for(int i=0; i<dst.number_of_drives; i++) { @@ -482,7 +482,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeStatRep //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeUpdateDriveRqstMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeUpdateDriveRqstMsgBody &dst) { try { io::unmarshalString(src, srcLen, dst.vid); io::unmarshalString(src, srcLen, dst.drive); @@ -497,7 +497,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeUpdateD //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeConfigRequestMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeConfigRequestMsgBody &dst) { try { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); @@ -514,7 +514,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeConfigR //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeLabelRqstMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeLabelRqstMsgBody &dst) { try { io::unmarshalUint16(src, srcLen, dst.force); io::unmarshalUint32(src, srcLen, dst.uid); @@ -533,7 +533,7 @@ void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeLabelRq //----------------------------------------------------------------------------- // unmarshal //----------------------------------------------------------------------------- -void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeStatRequestMsgBody &dst) throw(castor::exception::Exception) { +void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, TapeStatRequestMsgBody &dst) { try { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); diff --git a/castor/legacymsg/TapeMarshal.hpp b/castor/legacymsg/TapeMarshal.hpp index a9e62b3e9ef9ffcca3e212d859a9ffdc6888525c..0c4271d2a1e039237c9300a06a5862aa612eed4c 100644 --- a/castor/legacymsg/TapeMarshal.hpp +++ b/castor/legacymsg/TapeMarshal.hpp @@ -48,7 +48,7 @@ namespace legacymsg { * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const TapeConfigRequestMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const TapeConfigRequestMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -58,7 +58,7 @@ size_t marshal(char *const dst, const size_t dstLen, const TapeConfigRequestMsgB * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const TapeConfigRequestMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const TapeConfigRequestMsgBody &src) { return marshal(dst, n, src); } @@ -75,7 +75,7 @@ template<int n> size_t marshal(char (&dst)[n], const TapeConfigRequestMsgBody &s * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, TapeConfigRequestMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, TapeConfigRequestMsgBody &dst) ; /** * Marshals the specified source message body structure and its implicit @@ -86,7 +86,7 @@ void unmarshal(const char * &src, size_t &srcLen, TapeConfigRequestMsgBody &dst) * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const TapeStatRequestMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const TapeStatRequestMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -96,7 +96,7 @@ size_t marshal(char *const dst, const size_t dstLen, const TapeStatRequestMsgBod * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const TapeStatRequestMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const TapeStatRequestMsgBody &src) { return marshal(dst, n, src); } @@ -113,7 +113,7 @@ template<int n> size_t marshal(char (&dst)[n], const TapeStatRequestMsgBody &src * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, TapeStatRequestMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, TapeStatRequestMsgBody &dst) ; /** * Marshals the specified source message body structure and its implicit @@ -124,7 +124,7 @@ void unmarshal(const char * &src, size_t &srcLen, TapeStatRequestMsgBody &dst) t * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const TapeStatReplyMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const TapeStatReplyMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -134,7 +134,7 @@ size_t marshal(char *const dst, const size_t dstLen, const TapeStatReplyMsgBody * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const TapeStatReplyMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const TapeStatReplyMsgBody &src) { return marshal(dst, n, src); } @@ -151,7 +151,7 @@ template<int n> size_t marshal(char (&dst)[n], const TapeStatReplyMsgBody &src) * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, TapeStatReplyMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, TapeStatReplyMsgBody &dst) ; /** * Marshals the specified source message body structure and its implicit @@ -162,7 +162,7 @@ void unmarshal(const char * &src, size_t &srcLen, TapeStatReplyMsgBody &dst) thr * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const TapeUpdateDriveRqstMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const TapeUpdateDriveRqstMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -172,7 +172,7 @@ size_t marshal(char *const dst, const size_t dstLen, const TapeUpdateDriveRqstMs * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const TapeUpdateDriveRqstMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const TapeUpdateDriveRqstMsgBody &src) { return marshal(dst, n, src); } @@ -189,7 +189,7 @@ template<int n> size_t marshal(char (&dst)[n], const TapeUpdateDriveRqstMsgBody * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, TapeUpdateDriveRqstMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, TapeUpdateDriveRqstMsgBody &dst) ; /** * Marshals the specified source message body structure and its implicit @@ -200,7 +200,7 @@ void unmarshal(const char * &src, size_t &srcLen, TapeUpdateDriveRqstMsgBody &ds * @param src The source structure. * @return The total length of the message (header + body). */ -size_t marshal(char *const dst, const size_t dstLen, const TapeLabelRqstMsgBody &src) throw(castor::exception::Exception); +size_t marshal(char *const dst, const size_t dstLen, const TapeLabelRqstMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -210,7 +210,7 @@ size_t marshal(char *const dst, const size_t dstLen, const TapeLabelRqstMsgBody * @param src The source structure. * @return The total length of the message (header + body). */ -template<int n> size_t marshal(char (&dst)[n], const TapeLabelRqstMsgBody &src) throw(castor::exception::Exception) { +template<int n> size_t marshal(char (&dst)[n], const TapeLabelRqstMsgBody &src) { return marshal(dst, n, src); } @@ -227,7 +227,7 @@ template<int n> size_t marshal(char (&dst)[n], const TapeLabelRqstMsgBody &src) * return is the number of bytes remaining in the source buffer. * @param dst The destination message body structure. */ -void unmarshal(const char * &src, size_t &srcLen, TapeLabelRqstMsgBody &dst) throw(castor::exception::Exception); +void unmarshal(const char * &src, size_t &srcLen, TapeLabelRqstMsgBody &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/TapeserverProxy.hpp b/castor/legacymsg/TapeserverProxy.hpp index e869457f5585cbc06499d0c2ffc6de70e9a52747..143178e38a966ab7aa766c8b5820902c36307eae 100644 --- a/castor/legacymsg/TapeserverProxy.hpp +++ b/castor/legacymsg/TapeserverProxy.hpp @@ -53,7 +53,7 @@ public: virtual void gotReadMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the tapeserverd daemon that the mount-session child-process got @@ -65,7 +65,7 @@ public: virtual void gotWriteMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the tapeserverd daemon that the mount-session child-process got @@ -77,7 +77,7 @@ public: virtual void gotDumpMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the tapeserverd daemon that the specified tape has been mounted. @@ -88,7 +88,7 @@ public: virtual void tapeMountedForRead( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the tapeserverd daemon that the specified tape has been mounted. @@ -99,7 +99,7 @@ public: virtual void tapeMountedForWrite( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the tapeserverd daemon that the specified tape has been unmounted. @@ -110,7 +110,7 @@ public: virtual void tapeUnmounted( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) = 0; + = 0; }; // class TapeserverProxy diff --git a/castor/legacymsg/TapeserverProxyDummy.cpp b/castor/legacymsg/TapeserverProxyDummy.cpp index ab5f9ce236028839b96ae26dc46cc55dbe697955..9319c1bdec403769575526e66e5645f9ceeb1d4b 100644 --- a/castor/legacymsg/TapeserverProxyDummy.cpp +++ b/castor/legacymsg/TapeserverProxyDummy.cpp @@ -40,7 +40,7 @@ castor::legacymsg::TapeserverProxyDummy::~TapeserverProxyDummy() throw() { void castor::legacymsg::TapeserverProxyDummy::gotReadMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -49,7 +49,7 @@ void castor::legacymsg::TapeserverProxyDummy::gotReadMountDetailsFromClient( void castor::legacymsg::TapeserverProxyDummy::gotWriteMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -58,7 +58,7 @@ void castor::legacymsg::TapeserverProxyDummy::gotWriteMountDetailsFromClient( void castor::legacymsg::TapeserverProxyDummy::gotDumpMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -67,7 +67,7 @@ void castor::legacymsg::TapeserverProxyDummy::gotDumpMountDetailsFromClient( void castor::legacymsg::TapeserverProxyDummy::tapeMountedForRead( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -76,7 +76,7 @@ void castor::legacymsg::TapeserverProxyDummy::tapeMountedForRead( void castor::legacymsg::TapeserverProxyDummy::tapeMountedForWrite( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -85,5 +85,5 @@ void castor::legacymsg::TapeserverProxyDummy::tapeMountedForWrite( void castor::legacymsg::TapeserverProxyDummy::tapeUnmounted( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } diff --git a/castor/legacymsg/TapeserverProxyDummy.hpp b/castor/legacymsg/TapeserverProxyDummy.hpp index c3c40761bba95563c4cd4975f97aef7a4241d198..ad233a06d194b05df48585fec1f5e790534e636e 100644 --- a/castor/legacymsg/TapeserverProxyDummy.hpp +++ b/castor/legacymsg/TapeserverProxyDummy.hpp @@ -56,7 +56,7 @@ public: void gotReadMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Informs the tapeserverd daemon that the mount-session child-process got @@ -68,7 +68,7 @@ public: void gotWriteMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Informs the tapeserverd daemon that the mount-session child-process got @@ -80,7 +80,7 @@ public: void gotDumpMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Notifies the tapeserverd daemon that the specified tape has been mounted. @@ -91,7 +91,7 @@ public: void tapeMountedForRead( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Notifies the tapeserverd daemon that the specified tape has been mounted. @@ -102,7 +102,7 @@ public: void tapeMountedForWrite( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Notifies the tapeserverd daemon that the specified tape has been unmounted. @@ -113,7 +113,7 @@ public: void tapeUnmounted( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; }; // class TapeserverProxyDummy diff --git a/castor/legacymsg/TapeserverProxyTcpIp.cpp b/castor/legacymsg/TapeserverProxyTcpIp.cpp index 6025ff1bc477500f84ac0010c3807922c83f0cc4..d5844765d472a236edb194aa8ee4d4b6ae030ef5 100644 --- a/castor/legacymsg/TapeserverProxyTcpIp.cpp +++ b/castor/legacymsg/TapeserverProxyTcpIp.cpp @@ -52,7 +52,7 @@ castor::legacymsg::TapeserverProxyTcpIp::~TapeserverProxyTcpIp() throw() { void castor::legacymsg::TapeserverProxyTcpIp::gotReadMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { try { legacymsg::TapeUpdateDriveRqstMsgBody body; castor::utils::copyString(body.vid, vid.c_str()); @@ -74,7 +74,7 @@ void castor::legacymsg::TapeserverProxyTcpIp::gotReadMountDetailsFromClient( void castor::legacymsg::TapeserverProxyTcpIp::gotWriteMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { try { legacymsg::TapeUpdateDriveRqstMsgBody body; castor::utils::copyString(body.vid, vid.c_str()); @@ -96,7 +96,7 @@ void castor::legacymsg::TapeserverProxyTcpIp::gotWriteMountDetailsFromClient( void castor::legacymsg::TapeserverProxyTcpIp::gotDumpMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { try { legacymsg::TapeUpdateDriveRqstMsgBody body; castor::utils::copyString(body.vid, vid.c_str()); @@ -118,7 +118,7 @@ void castor::legacymsg::TapeserverProxyTcpIp::gotDumpMountDetailsFromClient( void castor::legacymsg::TapeserverProxyTcpIp::tapeMountedForRead( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -127,7 +127,7 @@ void castor::legacymsg::TapeserverProxyTcpIp::tapeMountedForRead( void castor::legacymsg::TapeserverProxyTcpIp::tapeMountedForWrite( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ @@ -136,13 +136,13 @@ void castor::legacymsg::TapeserverProxyTcpIp::tapeMountedForWrite( void castor::legacymsg::TapeserverProxyTcpIp::tapeUnmounted( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception) { + { } //----------------------------------------------------------------------------- // connectToTapeserver //----------------------------------------------------------------------------- -int castor::legacymsg::TapeserverProxyTcpIp::connectToTapeserver() const throw(castor::exception::Exception) { +int castor::legacymsg::TapeserverProxyTcpIp::connectToTapeserver() const { castor::utils::SmartFd smartConnectSock; try { smartConnectSock.reset(io::connectWithTimeout(m_tapeserverHostName, m_tapeserverPort, @@ -162,7 +162,7 @@ int castor::legacymsg::TapeserverProxyTcpIp::connectToTapeserver() const throw(c //----------------------------------------------------------------------------- void castor::legacymsg::TapeserverProxyTcpIp::writeTapeUpdateDriveRqstMsg( const int fd, const legacymsg::TapeUpdateDriveRqstMsgBody &body) - throw(castor::exception::Exception) { + { char buf[3 * sizeof(uint32_t) + sizeof(body)]; // header + body const size_t len = legacymsg::marshal(buf, sizeof(buf), body); @@ -179,7 +179,7 @@ void castor::legacymsg::TapeserverProxyTcpIp::writeTapeUpdateDriveRqstMsg( //----------------------------------------------------------------------------- // readReplyMsg //----------------------------------------------------------------------------- -void castor::legacymsg::TapeserverProxyTcpIp::readReplyMsg(const int fd) throw(castor::exception::Exception) { +void castor::legacymsg::TapeserverProxyTcpIp::readReplyMsg(const int fd) { char buf[3 * sizeof(uint32_t)]; // magic + request type + len io::readBytes(fd, m_netTimeout, sizeof(buf), buf); diff --git a/castor/legacymsg/TapeserverProxyTcpIp.hpp b/castor/legacymsg/TapeserverProxyTcpIp.hpp index 3cdc5eaa9c9d503870163e3e81107f76f0033eeb..0756e90ec6989dbd622f418c22c0224610d677b6 100644 --- a/castor/legacymsg/TapeserverProxyTcpIp.hpp +++ b/castor/legacymsg/TapeserverProxyTcpIp.hpp @@ -68,7 +68,7 @@ public: void gotReadMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Informs the tapeserverd daemon that the mount-session child-process got @@ -80,7 +80,7 @@ public: void gotWriteMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Informs the tapeserverd daemon that the mount-session child-process got @@ -92,7 +92,7 @@ public: void gotDumpMountDetailsFromClient( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Notifies the tapeserverd daemon that the specified tape has been mounted. @@ -103,7 +103,7 @@ public: void tapeMountedForRead( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Notifies the tapeserverd daemon that the specified tape has been mounted. @@ -114,7 +114,7 @@ public: void tapeMountedForWrite( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; /** * Notifies the tapeserverd daemon that the specified tape has been unmounted. @@ -125,7 +125,7 @@ public: void tapeUnmounted( const std::string &unitName, const std::string &vid) - throw(castor::exception::Exception); + ; private: @@ -134,21 +134,21 @@ private: * * @return The socket-descriptor of the connection with the vdqmd daemon. */ - int connectToTapeserver() const throw(castor::exception::Exception); + int connectToTapeserver() const ; /** * Writes the specified message to the specified connection. * * @param body The body of the message. */ - void writeTapeUpdateDriveRqstMsg(const int fd, const legacymsg::TapeUpdateDriveRqstMsgBody &body) throw(castor::exception::Exception); + void writeTapeUpdateDriveRqstMsg(const int fd, const legacymsg::TapeUpdateDriveRqstMsgBody &body) ; /** * Reads a reply message from the specified connection. * * @param fd The file-descriptor of the connection. */ - void readReplyMsg(const int fd) throw(castor::exception::Exception); + void readReplyMsg(const int fd) ; /** * The object representing the API of the CASTOR logging system. diff --git a/castor/legacymsg/VdqmMarshal.cpp b/castor/legacymsg/VdqmMarshal.cpp index 220293c50843d130bd9a1b5f7a8c28a0b95bb328..520d1e44329366ade221166800e9d0e0ea7a39d3 100644 --- a/castor/legacymsg/VdqmMarshal.cpp +++ b/castor/legacymsg/VdqmMarshal.cpp @@ -37,7 +37,7 @@ //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, const VdqmDrvRqstMsgBody &src) - throw(castor::exception::Exception) { + { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -121,7 +121,7 @@ size_t castor::legacymsg::marshal(char *const dst, //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, VdqmDrvRqstMsgBody &dst) - throw(castor::exception::Exception) { + { io::unmarshalInt32(src, srcLen, dst.status); io::unmarshalInt32(src, srcLen, dst.drvReqId); io::unmarshalInt32(src, srcLen, dst.volReqId); diff --git a/castor/legacymsg/VdqmMarshal.hpp b/castor/legacymsg/VdqmMarshal.hpp index 893d97c2db0a2a4f04662ec33b85adf045e63001..1e2c3bd0abdaca1f5949aaaa62facad419833a48 100644 --- a/castor/legacymsg/VdqmMarshal.hpp +++ b/castor/legacymsg/VdqmMarshal.hpp @@ -42,7 +42,7 @@ namespace legacymsg { * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const VdqmDrvRqstMsgBody &src) throw(castor::exception::Exception); + const VdqmDrvRqstMsgBody &src) ; /** * Marshals the specified source message body structure and its implicit @@ -53,7 +53,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const VdqmDrvRqstMsgBody &src) throw(castor::exception::Exception) { + const VdqmDrvRqstMsgBody &src) { return marshal(dst, n, src); } @@ -71,7 +71,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - VdqmDrvRqstMsgBody &dst) throw(castor::exception::Exception); + VdqmDrvRqstMsgBody &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/VdqmProxy.hpp b/castor/legacymsg/VdqmProxy.hpp index fb0784cbc26abfc30c1c3d29ead70c47fbbf7553..2643dad8e902b3e41fb718db6787e7266460c9a8 100644 --- a/castor/legacymsg/VdqmProxy.hpp +++ b/castor/legacymsg/VdqmProxy.hpp @@ -85,7 +85,7 @@ public: * @param dgn The device group name of the tape drive. */ virtual void setDriveDown(const std::string &server, const std::string &unitName, - const std::string &dgn) throw(castor::exception::Exception) = 0; + const std::string &dgn) = 0; /** * Sets the status of the specified tape drive to up. @@ -96,7 +96,7 @@ public: * @param dgn The device group name of the tape drive. */ virtual void setDriveUp(const std::string &server, const std::string &unitName, - const std::string &dgn) throw(castor::exception::Exception) = 0; + const std::string &dgn) = 0; /** * Assigns the specified mount session process to the specified tape @@ -112,7 +112,7 @@ public: */ virtual void assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, - const pid_t sessionPid) throw(castor::exception::Exception) = 0; + const pid_t sessionPid) = 0; /** * Notifies the vdqmd daemon of the specified tape mount. @@ -127,7 +127,7 @@ public: */ virtual void tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) - throw(castor::exception::Exception) = 0; + = 0; /** * Releases the specified tape drive. @@ -143,7 +143,7 @@ public: */ virtual void releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the vdqmd daemon that the specified tape has been dismounted. @@ -155,7 +155,7 @@ public: * @param vid The volume identifier of the mounted tape. */ virtual void tapeUnmounted(const std::string &server, const std::string &unitName, - const std::string &dgn, const std::string &vid) throw(castor::exception::Exception) = 0; + const std::string &dgn, const std::string &vid) = 0; }; // class VdqmProxy diff --git a/castor/legacymsg/VdqmProxyDummy.cpp b/castor/legacymsg/VdqmProxyDummy.cpp index bd0ba566f83365423a9f568acce40df56eba382c..245bb05ad1ca4779783ffb7d64bb9260cd7bf3ac 100644 --- a/castor/legacymsg/VdqmProxyDummy.cpp +++ b/castor/legacymsg/VdqmProxyDummy.cpp @@ -43,7 +43,7 @@ castor::legacymsg::VdqmProxyDummy::~VdqmProxyDummy() throw() { //------------------------------------------------------------------------------ // receiveJob //------------------------------------------------------------------------------ -castor::legacymsg::RtcpJobRqstMsgBody castor::legacymsg::VdqmProxyDummy::receiveJob(const int connection) throw(castor::exception::Exception) { +castor::legacymsg::RtcpJobRqstMsgBody castor::legacymsg::VdqmProxyDummy::receiveJob(const int connection) { if(!m_hasJob) throw castor::exception::Exception("In castor::legacymsg::VdqmProxyDummy::receiveJob: this object was constructed without a job."); return m_job; } @@ -51,35 +51,35 @@ castor::legacymsg::RtcpJobRqstMsgBody castor::legacymsg::VdqmProxyDummy::receive //------------------------------------------------------------------------------ // setDriveDown //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyDummy::setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyDummy::setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) { } //------------------------------------------------------------------------------ // setDriveUp //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyDummy::setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyDummy::setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) { } //------------------------------------------------------------------------------ // assignDrive //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyDummy::assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyDummy::assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) { } //------------------------------------------------------------------------------ // tapeMounted //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyDummy::tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyDummy::tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) { } //------------------------------------------------------------------------------ // releaseDrive //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyDummy::releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyDummy::releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) { } //----------------------------------------------------------------------------- // tapeUnmounted //----------------------------------------------------------------------------- -void castor::legacymsg::VdqmProxyDummy::tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyDummy::tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) { } diff --git a/castor/legacymsg/VdqmProxyDummy.hpp b/castor/legacymsg/VdqmProxyDummy.hpp index 6d974276b7de79171aa57ac067f8e82e3053dec4..29ca4a9a5e18d46f4ef448d7eba70da8ba3729eb 100644 --- a/castor/legacymsg/VdqmProxyDummy.hpp +++ b/castor/legacymsg/VdqmProxyDummy.hpp @@ -64,7 +64,7 @@ public: * daemon. * @return The job request from the vdqm. */ - RtcpJobRqstMsgBody receiveJob(const int connection) throw(castor::exception::Exception); + RtcpJobRqstMsgBody receiveJob(const int connection) ; /** * Sets the status of the specified tape drive to down. @@ -74,7 +74,7 @@ public: * @param unitName The unit name of the tape drive. * @param dgn The device group name of the tape drive. */ - void setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception); + void setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) ; /** * Sets the status of the specified tape drive to up. @@ -84,7 +84,7 @@ public: * @param unitName The unit name of the tape drive. * @param dgn The device group name of the tape drive. */ - void setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception); + void setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) ; /** * Sets the status of the specified tape drive to assign. @@ -97,7 +97,7 @@ public: * @param sessionPid The process ID of the tape-server daemon's mount-session * process. */ - void assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) throw(castor::exception::Exception); + void assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) ; /** * Notifies the vdqmd daemon of the specified tape mount. @@ -110,7 +110,7 @@ public: * @param sessionPid The process ID of the tape-server daemon's mount-session * process. */ - void tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) throw(castor::exception::Exception); + void tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) ; /** * Sets the status of the specified tape drive to release. @@ -124,7 +124,7 @@ public: * @param sessionPid The process ID of the tape-server daemon's mount-session * process. */ - void releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) throw(castor::exception::Exception); + void releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) ; /** * Notifies the vdqmd daemon that the specified tape has been dismounted. @@ -135,7 +135,7 @@ public: * @param dgn The device group name of the tape drive. * @param vid The volume identifier of the mounted tape. */ - void tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) throw(castor::exception::Exception); + void tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) ; private: diff --git a/castor/legacymsg/VdqmProxyTcpIp.cpp b/castor/legacymsg/VdqmProxyTcpIp.cpp index c60b8d9f6980aaa1c6b302444423dba0618eff14..13067e48f1032bda78799901adeaaeb35e401aba 100644 --- a/castor/legacymsg/VdqmProxyTcpIp.cpp +++ b/castor/legacymsg/VdqmProxyTcpIp.cpp @@ -49,7 +49,7 @@ castor::legacymsg::VdqmProxyTcpIp::~VdqmProxyTcpIp() throw() { //------------------------------------------------------------------------------ // setDriveDown //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyTcpIp::setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) { try { legacymsg::VdqmDrvRqstMsgBody body; body.status = VDQM_UNIT_DOWN; @@ -69,7 +69,7 @@ void castor::legacymsg::VdqmProxyTcpIp::setDriveDown(const std::string &server, //------------------------------------------------------------------------------ // setDriveUp //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyTcpIp::setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) { try { legacymsg::VdqmDrvRqstMsgBody body; body.status = VDQM_UNIT_UP; @@ -89,7 +89,7 @@ void castor::legacymsg::VdqmProxyTcpIp::setDriveUp(const std::string &server, co //------------------------------------------------------------------------------ // assignDrive //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyTcpIp::assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) { try { legacymsg::VdqmDrvRqstMsgBody body; body.status = VDQM_UNIT_ASSIGN; @@ -111,7 +111,7 @@ void castor::legacymsg::VdqmProxyTcpIp::assignDrive(const std::string &server, c //------------------------------------------------------------------------------ // tapeMounted //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyTcpIp::tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) { try { legacymsg::VdqmDrvRqstMsgBody body; body.status = VDQM_VOL_MOUNT; @@ -133,7 +133,7 @@ void castor::legacymsg::VdqmProxyTcpIp::tapeMounted(const std::string &server, c //------------------------------------------------------------------------------ // releaseDrive //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyTcpIp::releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) { int status = VDQM_UNIT_RELEASE; if(forceUnmount) { status |= VDQM_FORCE_UNMOUNT; @@ -159,7 +159,7 @@ void castor::legacymsg::VdqmProxyTcpIp::releaseDrive(const std::string &server, //------------------------------------------------------------------------------ // setDriveStatus //------------------------------------------------------------------------------ -void castor::legacymsg::VdqmProxyTcpIp::setDriveStatus(const legacymsg::VdqmDrvRqstMsgBody &body) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::setDriveStatus(const legacymsg::VdqmDrvRqstMsgBody &body) { castor::utils::SmartFd fd(connectToVdqm()); writeDriveStatusMsg(fd.get(), body); readCommitAck(fd.get()); @@ -171,7 +171,7 @@ void castor::legacymsg::VdqmProxyTcpIp::setDriveStatus(const legacymsg::VdqmDrvR //----------------------------------------------------------------------------- // connectToVdqm //----------------------------------------------------------------------------- -int castor::legacymsg::VdqmProxyTcpIp::connectToVdqm() const throw(castor::exception::Exception) { +int castor::legacymsg::VdqmProxyTcpIp::connectToVdqm() const { castor::utils::SmartFd smartConnectSock; try { smartConnectSock.reset(io::connectWithTimeout(m_vdqmHostName, m_vdqmPort, @@ -189,7 +189,7 @@ int castor::legacymsg::VdqmProxyTcpIp::connectToVdqm() const throw(castor::excep //----------------------------------------------------------------------------- // writeDriveStatusMsg //----------------------------------------------------------------------------- -void castor::legacymsg::VdqmProxyTcpIp::writeDriveStatusMsg(const int fd, const legacymsg::VdqmDrvRqstMsgBody &body) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::writeDriveStatusMsg(const int fd, const legacymsg::VdqmDrvRqstMsgBody &body) { char buf[VDQM_MSGBUFSIZ]; const size_t len = legacymsg::marshal(buf, body); @@ -206,7 +206,7 @@ void castor::legacymsg::VdqmProxyTcpIp::writeDriveStatusMsg(const int fd, const //----------------------------------------------------------------------------- // readCommitAck //----------------------------------------------------------------------------- -void castor::legacymsg::VdqmProxyTcpIp::readCommitAck(const int fd) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::readCommitAck(const int fd) { legacymsg::MessageHeader ack; try { @@ -247,7 +247,7 @@ void castor::legacymsg::VdqmProxyTcpIp::readCommitAck(const int fd) throw(castor //----------------------------------------------------------------------------- // readAck //----------------------------------------------------------------------------- -castor::legacymsg::MessageHeader castor::legacymsg::VdqmProxyTcpIp::readAck(const int fd) throw(castor::exception::Exception) { +castor::legacymsg::MessageHeader castor::legacymsg::VdqmProxyTcpIp::readAck(const int fd) { char buf[12]; // Magic + type + len legacymsg::MessageHeader ack; @@ -270,7 +270,7 @@ castor::legacymsg::MessageHeader castor::legacymsg::VdqmProxyTcpIp::readAck(cons //----------------------------------------------------------------------------- // readDriveStatusMsgHeader //----------------------------------------------------------------------------- -castor::legacymsg::MessageHeader castor::legacymsg::VdqmProxyTcpIp::readDriveStatusMsgHeader(const int fd) throw(castor::exception::Exception) { +castor::legacymsg::MessageHeader castor::legacymsg::VdqmProxyTcpIp::readDriveStatusMsgHeader(const int fd) { char buf[12]; // Magic + type + len legacymsg::MessageHeader header; @@ -311,7 +311,7 @@ castor::legacymsg::MessageHeader castor::legacymsg::VdqmProxyTcpIp::readDriveSta //----------------------------------------------------------------------------- // readDriveStatusMsgBody //----------------------------------------------------------------------------- -castor::legacymsg::VdqmDrvRqstMsgBody castor::legacymsg::VdqmProxyTcpIp::readDriveStatusMsgBody(const int fd, const uint32_t bodyLen) throw(castor::exception::Exception) { +castor::legacymsg::VdqmDrvRqstMsgBody castor::legacymsg::VdqmProxyTcpIp::readDriveStatusMsgBody(const int fd, const uint32_t bodyLen) { char buf[VDQM_MSGBUFSIZ]; if(sizeof(buf) < bodyLen) { @@ -341,7 +341,7 @@ castor::legacymsg::VdqmDrvRqstMsgBody castor::legacymsg::VdqmProxyTcpIp::readDri //----------------------------------------------------------------------------- // writeCommitAck //----------------------------------------------------------------------------- -void castor::legacymsg::VdqmProxyTcpIp::writeCommitAck(const int fd) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::writeCommitAck(const int fd) { legacymsg::MessageHeader ack; ack.magic = VDQM_MAGIC; ack.reqType = VDQM_COMMIT; @@ -363,7 +363,7 @@ void castor::legacymsg::VdqmProxyTcpIp::writeCommitAck(const int fd) throw(casto //----------------------------------------------------------------------------- // tapeUnmounted //----------------------------------------------------------------------------- -void castor::legacymsg::VdqmProxyTcpIp::tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) throw(castor::exception::Exception) { +void castor::legacymsg::VdqmProxyTcpIp::tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) { int status = VDQM_VOL_UNMOUNT; try { diff --git a/castor/legacymsg/VdqmProxyTcpIp.hpp b/castor/legacymsg/VdqmProxyTcpIp.hpp index e77fa3c6804bb5dcc271abf68c23d7005281ad7b..9b95779ee18d0b3db06ebd64506679c3f592a9a6 100644 --- a/castor/legacymsg/VdqmProxyTcpIp.hpp +++ b/castor/legacymsg/VdqmProxyTcpIp.hpp @@ -64,7 +64,7 @@ public: * @param unitName The unit name of the tape drive. * @param dgn The device group name of the tape drive. */ - void setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception); + void setDriveDown(const std::string &server, const std::string &unitName, const std::string &dgn) ; /** * Sets the status of the specified tape drive to up. @@ -74,7 +74,7 @@ public: * @param unitName The unit name of the tape drive. * @param dgn The device group name of the tape drive. */ - void setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) throw(castor::exception::Exception); + void setDriveUp(const std::string &server, const std::string &unitName, const std::string &dgn) ; /** * Sets the status of the specified tape drive to assign. @@ -87,7 +87,7 @@ public: * @param sessionPid The process ID of the tape-server daemon's mount-session * process. */ - void assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) throw(castor::exception::Exception); + void assignDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const uint32_t mountTransactionId, const pid_t sessionPid) ; /** * Notifies the vdqmd daemon of the specified tape mount. @@ -100,7 +100,7 @@ public: * @param sessionPid The process ID of the tape-server daemon's mount-session * process. */ - void tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) throw(castor::exception::Exception); + void tapeMounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid, const pid_t sessionPid) ; /** * Sets the status of the specified tape drive to release. @@ -114,7 +114,7 @@ public: * @param sessionPid The process ID of the tape-server daemon's mount-session * process. */ - void releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) throw(castor::exception::Exception); + void releaseDrive(const std::string &server, const std::string &unitName, const std::string &dgn, const bool forceUnmount, const pid_t sessionPid) ; /** * Notifies the vdqmd daemon that the specified tape has been dismounted. @@ -125,7 +125,7 @@ public: * @param dgn The device group name of the tape drive. * @param vid The volume identifier of the mounted tape. */ - void tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) throw(castor::exception::Exception); + void tapeUnmounted(const std::string &server, const std::string &unitName, const std::string &dgn, const std::string &vid) ; private: @@ -134,14 +134,14 @@ private: * * @param body The message body defining the drive and status. */ - void setDriveStatus(const VdqmDrvRqstMsgBody &body) throw(castor::exception::Exception); + void setDriveStatus(const VdqmDrvRqstMsgBody &body) ; /** * Connects to the vdqmd daemon. * * @return The socket-descriptor of the connection with the vdqmd daemon. */ - int connectToVdqm() const throw(castor::exception::Exception); + int connectToVdqm() const ; /** * Writes a drive status message with the specifed contents to the specified @@ -149,7 +149,7 @@ private: * * @param body The message body defining the drive and status. */ - void writeDriveStatusMsg(const int fd, const VdqmDrvRqstMsgBody &body) throw(castor::exception::Exception); + void writeDriveStatusMsg(const int fd, const VdqmDrvRqstMsgBody &body) ; /** * Reads a VDQM_COMMIT ack message from the specified connection. @@ -157,7 +157,7 @@ private: * @param fd The file-descriptor of the connection. * @return The message. */ - void readCommitAck(const int fd) throw(castor::exception::Exception); + void readCommitAck(const int fd) ; /** * Reads an ack message from the specified connection. @@ -165,14 +165,14 @@ private: * @param fd The file-descriptor of the connection. * @return The message. */ - MessageHeader readAck(const int fd) throw(castor::exception::Exception); + MessageHeader readAck(const int fd) ; /** * Reads drive status message from the specified connection and discards it. * * @param fd The file-descriptor of the connection. */ - void readDriveStatusMsg(const int fd) throw(castor::exception::Exception); + void readDriveStatusMsg(const int fd) ; /** * Reads the header of a drive status message from the specified connection. @@ -180,21 +180,21 @@ private: * @param fd The file-descriptor of the connection. * @return The message header. */ - MessageHeader readDriveStatusMsgHeader(const int fd) throw(castor::exception::Exception); + MessageHeader readDriveStatusMsgHeader(const int fd) ; /** * Reads the body of a drive status message from the specified connection. * @param fd The file-descriptor of the connection. * @return The message body. */ - VdqmDrvRqstMsgBody readDriveStatusMsgBody(const int fd, const uint32_t bodyLen) throw(castor::exception::Exception); + VdqmDrvRqstMsgBody readDriveStatusMsgBody(const int fd, const uint32_t bodyLen) ; /** * Writes a VDQM_COMMIT ack message to the specified connection. * * @param fd The file-descriptor of the connection. */ - void writeCommitAck(const int fd) throw(castor::exception::Exception); + void writeCommitAck(const int fd) ; /** * The object representing the API of the CASTOR logging system. diff --git a/castor/legacymsg/VmgrMarshal.cpp b/castor/legacymsg/VmgrMarshal.cpp index 96b26949771f237b749be08ee9b163e0b6648513..9cb549d982145e7b3b7e6ff33d4a37964552caa4 100644 --- a/castor/legacymsg/VmgrMarshal.cpp +++ b/castor/legacymsg/VmgrMarshal.cpp @@ -38,7 +38,7 @@ // marshal //----------------------------------------------------------------------------- size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, - const VmgrTapeInfoRqstMsgBody &src) throw(castor::exception::Exception) { + const VmgrTapeInfoRqstMsgBody &src) { if(dst == NULL) { castor::exception::Exception ex; @@ -100,7 +100,7 @@ size_t castor::legacymsg::marshal(char *const dst, const size_t dstLen, //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, VmgrTapeInfoRqstMsgBody &dst) - throw(castor::exception::Exception) { + { io::unmarshalUint32(src, srcLen, dst.uid); io::unmarshalUint32(src, srcLen, dst.gid); io::unmarshalString(src, srcLen, dst.vid); @@ -112,7 +112,7 @@ void castor::legacymsg::unmarshal(const char * &src, //----------------------------------------------------------------------------- void castor::legacymsg::unmarshal(const char * &src, size_t &srcLen, VmgrTapeInfoMsgBody &dst) - throw(castor::exception::Exception) { + { io::unmarshalString(src, srcLen, dst.vsn ); io::unmarshalString(src, srcLen, dst.library ); diff --git a/castor/legacymsg/VmgrMarshal.hpp b/castor/legacymsg/VmgrMarshal.hpp index 3225948226e9bda4197f78b6d78b84cb68d60362..8d01d486133f5b7fd1b5d8b3b217099ae950fb8f 100644 --- a/castor/legacymsg/VmgrMarshal.hpp +++ b/castor/legacymsg/VmgrMarshal.hpp @@ -48,7 +48,7 @@ namespace legacymsg { * @return The total length of the message (header + body). */ size_t marshal(char *const dst, const size_t dstLen, - const VmgrTapeInfoRqstMsgBody &src) throw(castor::exception::Exception); + const VmgrTapeInfoRqstMsgBody &src) ; /** * Marshalls the specified source message body structure into the @@ -59,7 +59,7 @@ size_t marshal(char *const dst, const size_t dstLen, * @return The total length of the message (header + body). */ template<int n> size_t marshal(char (&dst)[n], - const VmgrTapeInfoRqstMsgBody &src) throw(castor::exception::Exception) { + const VmgrTapeInfoRqstMsgBody &src) { return marshal(dst, n, src); } @@ -77,7 +77,7 @@ template<int n> size_t marshal(char (&dst)[n], * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - VmgrTapeInfoRqstMsgBody &dst) throw(castor::exception::Exception); + VmgrTapeInfoRqstMsgBody &dst) ; /** * Unmarshals a message body with the specified destination structure type @@ -93,7 +93,7 @@ void unmarshal(const char * &src, size_t &srcLen, * @param dst The destination message body structure. */ void unmarshal(const char * &src, size_t &srcLen, - VmgrTapeInfoMsgBody &dst) throw(castor::exception::Exception); + VmgrTapeInfoMsgBody &dst) ; } // namespace legacymsg } // namespace castor diff --git a/castor/legacymsg/VmgrProxy.hpp b/castor/legacymsg/VmgrProxy.hpp index 8e38f6f3c07fb97308cf369265201c7e760126bc..ecfb9bce6d78930be8e07fcbc9f615f6da07c7f6 100644 --- a/castor/legacymsg/VmgrProxy.hpp +++ b/castor/legacymsg/VmgrProxy.hpp @@ -53,7 +53,7 @@ public: * @param */ virtual void tapeMountedForRead(const std::string &vid) - throw (castor::exception::Exception) = 0; + = 0; /** * Notifies the vmgrd daemon that the specified tape has been mounted for read. @@ -62,7 +62,7 @@ public: * @param */ virtual void tapeMountedForWrite(const std::string &vid) - throw (castor::exception::Exception) = 0; + = 0; }; // class VmgrProxy diff --git a/castor/legacymsg/VmgrProxyDummy.cpp b/castor/legacymsg/VmgrProxyDummy.cpp index a9e018afba6adb7ce1fa958070b9eb1cee3ffa57..f781731f51fe5ebbd747641541ee4b343a406bab 100644 --- a/castor/legacymsg/VmgrProxyDummy.cpp +++ b/castor/legacymsg/VmgrProxyDummy.cpp @@ -32,12 +32,12 @@ castor::legacymsg::VmgrProxyDummy::~VmgrProxyDummy() throw() { // tapeMountedForRead //------------------------------------------------------------------------------ void castor::legacymsg::VmgrProxyDummy::tapeMountedForRead(const std::string &vid) - throw (castor::exception::Exception) { + { } //------------------------------------------------------------------------------ // tapeMountedForWrite //------------------------------------------------------------------------------ void castor::legacymsg::VmgrProxyDummy::tapeMountedForWrite(const std::string &vid) - throw (castor::exception::Exception) { + { } diff --git a/castor/legacymsg/VmgrProxyDummy.hpp b/castor/legacymsg/VmgrProxyDummy.hpp index 15253bffb8fbf78297e967a273db747aca2243b1..39ac1f6ea06af6a7bcafa1dd7b675901dce805bd 100644 --- a/castor/legacymsg/VmgrProxyDummy.hpp +++ b/castor/legacymsg/VmgrProxyDummy.hpp @@ -47,7 +47,7 @@ public: * @param */ void tapeMountedForRead(const std::string &vid) - throw (castor::exception::Exception); + ; /** * Notifies the vmgrd daemon that the specified tape has been mounted for read. @@ -56,7 +56,7 @@ public: * @param */ void tapeMountedForWrite(const std::string &vid) - throw (castor::exception::Exception); + ; }; // class VmgrProxyDummy diff --git a/castor/legacymsg/VmgrProxyTcpIp.cpp b/castor/legacymsg/VmgrProxyTcpIp.cpp index d7cd05693d7171a4c6c8e7f23c110076bbf67575..c8714a0123ea3456245a67a3594ff6bdba5f3b25 100644 --- a/castor/legacymsg/VmgrProxyTcpIp.cpp +++ b/castor/legacymsg/VmgrProxyTcpIp.cpp @@ -48,20 +48,20 @@ castor::legacymsg::VmgrProxyTcpIp::~VmgrProxyTcpIp() throw() { // tapeMountedForRead //------------------------------------------------------------------------------ void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForRead(const std::string &vid) - throw (castor::exception::Exception) { + { } //------------------------------------------------------------------------------ // tapeMountedForWrite //------------------------------------------------------------------------------ void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForWrite(const std::string &vid) - throw (castor::exception::Exception) { + { } //----------------------------------------------------------------------------- // connectToVmgr //----------------------------------------------------------------------------- -int castor::legacymsg::VmgrProxyTcpIp::connectToVmgr() const throw(castor::exception::Exception) { +int castor::legacymsg::VmgrProxyTcpIp::connectToVmgr() const { castor::utils::SmartFd smartConnectSock; try { smartConnectSock.reset(io::connectWithTimeout(m_vmgrHostName, m_vmgrPort, diff --git a/castor/legacymsg/VmgrProxyTcpIp.hpp b/castor/legacymsg/VmgrProxyTcpIp.hpp index 67ab1c96a53a0f393591be4364b0a17ad53826a3..2f594d874b464b6a9449ee71f92ba9f4b67e5743 100644 --- a/castor/legacymsg/VmgrProxyTcpIp.hpp +++ b/castor/legacymsg/VmgrProxyTcpIp.hpp @@ -58,7 +58,7 @@ public: * @param */ void tapeMountedForRead(const std::string &vid) - throw (castor::exception::Exception); + ; /** * Notifies the vmgrd daemon that the specified tape has been mounted for read. @@ -67,7 +67,7 @@ public: * @param */ void tapeMountedForWrite(const std::string &vid) - throw (castor::exception::Exception); + ; private: @@ -97,7 +97,7 @@ private: * * @return The socket-descriptor of the connection with the vmgrd daemon. */ - int connectToVmgr() const throw(castor::exception::Exception); + int connectToVmgr() const ; }; // class VmgrProxyTcpIp diff --git a/castor/log/DummyLogger.cpp b/castor/log/DummyLogger.cpp index d5b841d8ccfb664dfd8c67dca4c7eb7dcbc2676b..bfb4b63c57a2b7865ca17da9301e53ebc3c237e1 100644 --- a/castor/log/DummyLogger.cpp +++ b/castor/log/DummyLogger.cpp @@ -42,7 +42,7 @@ castor::log::DummyLogger::~DummyLogger() throw() { // prepareForFork //------------------------------------------------------------------------------ void castor::log::DummyLogger::prepareForFork() - throw(castor::exception::Exception) { + { } //------------------------------------------------------------------------------ diff --git a/castor/log/DummyLogger.hpp b/castor/log/DummyLogger.hpp index 2c8b9dfca8ac8a130a888d934b2943473805d7a7..4e75e67c1e1485f73d311fb546d4900153ab1afc 100644 --- a/castor/log/DummyLogger.hpp +++ b/castor/log/DummyLogger.hpp @@ -67,7 +67,7 @@ public: * No further calls to operator() should be made after calling this * method until the call to fork() has completed. */ - void prepareForFork() throw(castor::exception::Exception); + void prepareForFork() ; /** * Dummy operator() method that does nothing. diff --git a/castor/log/LogContext.cpp b/castor/log/LogContext.cpp index 671d53ccaa8b45799a1e6b65d65ab09276f7e6fc..239412e652bf0ae7ae73595cb36c23e45d89eac1 100644 --- a/castor/log/LogContext.cpp +++ b/castor/log/LogContext.cpp @@ -31,10 +31,10 @@ #include "Logger.hpp" #include "Ctape_constants.h" -castor::log::LogContext::LogContext(castor::log::Logger& logger) throw (): +castor::log::LogContext::LogContext(castor::log::Logger& logger) throw(): m_log(logger) {} -void castor::log::LogContext::pushOrReplace(const Param& param) throw () { +void castor::log::LogContext::pushOrReplace(const Param& param) throw() { ParamNameMatcher match(param.getName()); std::list<Param>::iterator i = std::find_if(m_params.begin(), m_params.end(), match); @@ -45,7 +45,7 @@ void castor::log::LogContext::pushOrReplace(const Param& param) throw () { } } -void castor::log::LogContext::erase(const std::string& paramName) throw () { +void castor::log::LogContext::erase(const std::string& paramName) throw() { bool found; do { found = false; @@ -59,7 +59,7 @@ void castor::log::LogContext::erase(const std::string& paramName) throw () { } while (found); } -void castor::log::LogContext::log(const int priority, const std::string& msg) throw () { +void castor::log::LogContext::log(const int priority, const std::string& msg) throw() { m_log(priority, msg, m_params); } @@ -69,7 +69,7 @@ void castor::log::LogContext::log(const int priority, const std::string& msg, } void castor::log::LogContext::logBacktrace(const int priority, - const std::string& backtrace) throw () { + const std::string& backtrace) throw() { // Sanity check to prevent substr from throwing exceptions if (!backtrace.size()) return; @@ -100,12 +100,12 @@ void castor::log::LogContext::logBacktrace(const int priority, castor::log::LogContext::ScopedParam::ScopedParam( LogContext& context, - const Param& param) throw (): + const Param& param) throw(): m_context(context), m_name(param.getName()) { m_context.pushOrReplace(param); } -castor::log::LogContext::ScopedParam::~ScopedParam() throw () { +castor::log::LogContext::ScopedParam::~ScopedParam() throw() { m_context.erase(m_name); } diff --git a/castor/log/LogContext.hpp b/castor/log/LogContext.hpp index 74283dcb5dac8985769d95496ddb24c886284716..a2acc2d17c94e9e38b62fe077511a1e0984351e8 100644 --- a/castor/log/LogContext.hpp +++ b/castor/log/LogContext.hpp @@ -63,13 +63,13 @@ public: * name. Does not throw exceptions (fails silently). * @param param */ - void pushOrReplace(const Param & param) throw (); + void pushOrReplace(const Param & param) throw(); /** * Removes a parameter from the list. * @param paramName value of param.getName(); */ - void erase(const std::string & paramName) throw (); + void erase(const std::string & paramName) throw(); /** * Writes a message into the CASTOR logging system. Note that no exception @@ -123,8 +123,8 @@ public: */ class ParamNameMatcher { public: - ParamNameMatcher(const std::string & name) throw (): m_name(name) {} - bool operator() (const Param & p) throw () { return m_name == p.getName(); } + ParamNameMatcher(const std::string & name) throw(): m_name(name) {} + bool operator() (const Param & p) throw() { return m_name == p.getName(); } private: std::string m_name; }; diff --git a/castor/log/Logger.hpp b/castor/log/Logger.hpp index a9f4d645aee92deb8d5213ddcc3f0c7dc9aa963d..8db9d725f2f2182b433d86cd12788f3bafaa8507 100644 --- a/castor/log/Logger.hpp +++ b/castor/log/Logger.hpp @@ -111,7 +111,7 @@ public: * No further calls to operator() should be made after calling this * method until the call to fork() has completed. */ - virtual void prepareForFork() throw(castor::exception::Exception) = 0; + virtual void prepareForFork() = 0; /** * Returns the name of the program that is to be prepended to every log diff --git a/castor/log/StringLogger.cpp b/castor/log/StringLogger.cpp index 0153c458b1d33aa6577ee170029b7486fd8dc8ee..7df4eb7d6e693b16c426769792679eb8e133d9a6 100644 --- a/castor/log/StringLogger.cpp +++ b/castor/log/StringLogger.cpp @@ -73,7 +73,7 @@ size_t castor::log::StringLogger::determineMaxMsgLen() const throw() { //------------------------------------------------------------------------------ std::map<int, std::string> castor::log::StringLogger::generatePriorityToTextMap() const - throw(castor::exception::Exception) { + { std::map<int, std::string> m; try { @@ -99,7 +99,7 @@ std::map<int, std::string> // initMutex //------------------------------------------------------------------------------ void castor::log::StringLogger::initMutex() - throw(castor::exception::Exception) { + { pthread_mutexattr_t attr; int rc = pthread_mutexattr_init(&attr); if(0 != rc) { @@ -141,7 +141,7 @@ castor::log::StringLogger::~StringLogger() throw() { // prepareForFork //------------------------------------------------------------------------------ void castor::log::StringLogger::prepareForFork() - throw(castor::exception::Exception) {} + {} //----------------------------------------------------------------------------- // operator() diff --git a/castor/log/StringLogger.hpp b/castor/log/StringLogger.hpp index 1fac2cb66132b0c3f7ad08e953e3642155e15e8e..273b13ace859fa91ea7c86d21ae08ab6318739b9 100644 --- a/castor/log/StringLogger.hpp +++ b/castor/log/StringLogger.hpp @@ -69,7 +69,7 @@ public: * No further calls to operator() should be made after calling this * method until the call to fork() has completed. */ - void prepareForFork() throw(castor::exception::Exception); + void prepareForFork() ; /** * Writes a message into the CASTOR logging system. Note that no exception @@ -266,13 +266,13 @@ private: * textual representations. */ std::map<int, std::string> generatePriorityToTextMap() const - throw(castor::exception::Exception); + ; /** * Initializes the mutex used to protect the critical section of the * StringLogger object. */ - void initMutex() throw(castor::exception::Exception); + void initMutex() ; /** * Writes a message into the CASTOR logging system. Note that no exception diff --git a/castor/log/SyslogLogger.cpp b/castor/log/SyslogLogger.cpp index 845a65f561c464627bbf80fe7be53375f0898e54..1be20c9d43ab81610cc1a67364b28453eb4e9697 100644 --- a/castor/log/SyslogLogger.cpp +++ b/castor/log/SyslogLogger.cpp @@ -102,7 +102,7 @@ size_t castor::log::SyslogLogger::determineMaxMsgLen() const throw() { //------------------------------------------------------------------------------ std::map<int, std::string> castor::log::SyslogLogger::generatePriorityToTextMap() const - throw(castor::exception::Exception) { + { std::map<int, std::string> m; try { @@ -129,7 +129,7 @@ std::map<int, std::string> //------------------------------------------------------------------------------ std::map<std::string, int> castor::log::SyslogLogger::generateConfigTextToPriorityMap() const - throw(castor::exception::Exception) { + { std::map<std::string, int> m; try { @@ -156,7 +156,7 @@ std::map<std::string, int> // initMutex //------------------------------------------------------------------------------ void castor::log::SyslogLogger::initMutex() - throw(castor::exception::Exception) { + { pthread_mutexattr_t attr; int rc = pthread_mutexattr_init(&attr); if(0 != rc) { @@ -198,7 +198,7 @@ castor::log::SyslogLogger::~SyslogLogger() throw() { // prepareForFork //------------------------------------------------------------------------------ void castor::log::SyslogLogger::prepareForFork() - throw(castor::exception::Exception) { + { // Enter critical section { const int mutex_lock_rc = pthread_mutex_lock(&m_mutex); @@ -206,7 +206,7 @@ void castor::log::SyslogLogger::prepareForFork() castor::exception::Exception ex; ex.getMessage() << "Failed to lock mutex of logger's critcial section: " << sstrerror(mutex_lock_rc); - throw(ex); + throw ex; } } @@ -219,7 +219,7 @@ void castor::log::SyslogLogger::prepareForFork() castor::exception::Exception ex; ex.getMessage() << "Failed to unlock mutex of logger's critcial section: " << sstrerror(mutex_unlock_rc); - throw(ex); + throw ex; } } } diff --git a/castor/log/SyslogLogger.hpp b/castor/log/SyslogLogger.hpp index 074693194e7e9757666827f56114734e8c6ff18e..bc92ace3538ce1d4eeefd70c60bd4aea9618bc01 100644 --- a/castor/log/SyslogLogger.hpp +++ b/castor/log/SyslogLogger.hpp @@ -68,7 +68,7 @@ public: * No further calls to operator() should be made after calling this * method until the call to fork() has completed. */ - void prepareForFork() throw(castor::exception::Exception); + void prepareForFork() ; /** * Writes a message into the CASTOR logging system. Note that no exception @@ -316,7 +316,7 @@ protected: * textual representations. */ std::map<int, std::string> generatePriorityToTextMap() const - throw(castor::exception::Exception); + ; /** * Generates and returns the mapping between the possible string values @@ -324,13 +324,13 @@ protected: * syslog priorities. */ std::map<std::string, int> generateConfigTextToPriorityMap() const - throw(castor::exception::Exception); + ; /** * Initializes the mutex used to protect the critical section of the * SyslogLogger object. */ - void initMutex() throw(castor::exception::Exception); + void initMutex() ; /** * Connects to syslog. diff --git a/castor/metrics/Counter.cpp b/castor/metrics/Counter.cpp index 86a422a8ae630d2d3dfda8605b206639d2fd882c..5b9ec01c79471239e8dadbf44a95dab072a33dac 100644 --- a/castor/metrics/Counter.cpp +++ b/castor/metrics/Counter.cpp @@ -37,7 +37,7 @@ //------------------------------------------------------------------------------ // inc //------------------------------------------------------------------------------ -void castor::metrics::Counter::inc(int value) throw (castor::exception::Exception) +void castor::metrics::Counter::inc(int value) { m_mutex.lock(); m_value += value; diff --git a/castor/metrics/Counter.hpp b/castor/metrics/Counter.hpp index 8e4e10d204faf1c293337bd4e13d7e0ba92f5343..923d7a0d79a7ce382cf87d751fa83027a5247afb 100644 --- a/castor/metrics/Counter.hpp +++ b/castor/metrics/Counter.hpp @@ -81,7 +81,7 @@ namespace castor { * @param value the amount by which the counter will be incremented * @throw exception on mutex errors */ - void inc(int value = 1) throw (castor::exception::Exception); + void inc(int value = 1) ; /** * Recomputes mobile averages. diff --git a/castor/metrics/Histogram.cpp b/castor/metrics/Histogram.cpp index 29aa7cc7ba0f8ed4a61e5daffacd8bc8dd3a34bc..1d05faa6d147ed1ef35eb56e6904f08031f1cda9 100644 --- a/castor/metrics/Histogram.cpp +++ b/castor/metrics/Histogram.cpp @@ -51,7 +51,7 @@ castor::metrics::Histogram::~Histogram() // notifyNewValue //------------------------------------------------------------------------------ void castor::metrics::Histogram::notifyNewValue(castor::IObject* obj) - throw (castor::exception::Exception) + { if(m_instantiator != 0) { try { @@ -88,7 +88,7 @@ void castor::metrics::Histogram::notifyNewValue(castor::IObject* obj) // printXml //------------------------------------------------------------------------------ std::string castor::metrics::Histogram::printXml(std::string counterName) - throw (castor::exception::Exception) + { std::ostringstream ss; ss << "<histogram name='" << m_name << "'>\n"; diff --git a/castor/metrics/Histogram.hpp b/castor/metrics/Histogram.hpp index c43b4dcea424cafe0d9115f8b5ccbbc3e45cdb60..6ef0b079637f1e607cf3f84afc654f2caed9e196 100644 --- a/castor/metrics/Histogram.hpp +++ b/castor/metrics/Histogram.hpp @@ -69,7 +69,7 @@ namespace castor { * @throw exception in case of mutex errors */ virtual void notifyNewValue(castor::IObject* obj) - throw (castor::exception::Exception); + ; /** * Returns an XML representation of this histogram @@ -77,7 +77,7 @@ namespace castor { * @throw castor::exception::Exception(ENOENT) when counter not found */ std::string printXml(std::string counterName) - throw (castor::exception::Exception); + ; /// Gets this histogram's name std::string getName() { diff --git a/castor/metrics/MetricsCollector.cpp b/castor/metrics/MetricsCollector.cpp index 95ba384f9fbbcd1adf0553df612a3af6851daebf..059671af90c953590e1d8e615e301a2c2a6ae019 100644 --- a/castor/metrics/MetricsCollector.cpp +++ b/castor/metrics/MetricsCollector.cpp @@ -107,7 +107,7 @@ castor::metrics::MetricsCollector::~MetricsCollector() throw() // updateHistograms //------------------------------------------------------------------------------ void castor::metrics::MetricsCollector::updateHistograms(castor::IObject* obj) - throw (castor::exception::Exception) + { for(HistogramsIter h = histBegin(); h != histEnd(); h++) { CountersIter c; @@ -132,7 +132,7 @@ void castor::metrics::MetricsCollector::updateHistograms(castor::IObject* obj) // printXml //------------------------------------------------------------------------------ std::string castor::metrics::MetricsCollector::printXml(std::string histName, std::string counterName) - throw (castor::exception::Exception) + { std::ostringstream ss; time_t t = time(NULL); diff --git a/castor/metrics/MetricsCollector.hpp b/castor/metrics/MetricsCollector.hpp index da16bfbd1a9ef9bd426ed627fed56813b911eed2..0849578da798b2e2c6c977c9242c323e112ac099 100644 --- a/castor/metrics/MetricsCollector.hpp +++ b/castor/metrics/MetricsCollector.hpp @@ -52,12 +52,12 @@ namespace castor { castor::server::MultiThreadedDaemon* daemon = 0); /// Default destructor - virtual ~MetricsCollector() throw (); + virtual ~MetricsCollector() throw(); /// Method to be called by application's threads /// to count the object represented by obj (e.g. a Request) void updateHistograms(castor::IObject* obj) - throw (castor::exception::Exception); + ; /// Add a new histogram to the system void addHistogram(castor::metrics::Histogram* h) { @@ -70,7 +70,7 @@ namespace castor { * @throw castor::exception::Exception(ENOENT) when data not found */ std::string printXml(std::string histName, std::string counterName) - throw (castor::exception::Exception); + ; /** * Dumps the current metrics' values to a proc-like XML-formatted file. diff --git a/castor/query/IQuerySvc.hpp b/castor/query/IQuerySvc.hpp index 25b235e070eb2ebfcd879ef566119f7cc895e784..7021ecab105a2c5ec5c7972b60559485ee050939 100644 --- a/castor/query/IQuerySvc.hpp +++ b/castor/query/IQuerySvc.hpp @@ -80,7 +80,7 @@ namespace castor { u_signed64 svcClassId, unsigned euid, unsigned egid) - throw (castor::exception::Exception) = 0; + = 0; /** * Gets all DiskCopies for a given file. @@ -102,7 +102,7 @@ namespace castor { unsigned euid, unsigned egid, std::string& fileName) - throw (castor::exception::Exception) = 0; + = 0; /** @@ -125,7 +125,7 @@ namespace castor { diskCopies4Request (castor::stager::RequestQueryType reqType, std::string param, u_signed64 svcClassId) - throw (castor::exception::Exception) = 0; + = 0; /** * Lists diskpools and give details on their machine/filesystems @@ -146,7 +146,7 @@ namespace castor { unsigned long egid, bool detailed, enum castor::query::DiskPoolQueryType queryType) - throw (castor::exception::Exception) = 0; + = 0; /** * Give details on the machines/filesystems of a given diskpool @@ -165,7 +165,7 @@ namespace castor { std::string svcClass, bool detailed, enum castor::query::DiskPoolQueryType queryType) - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IQuerySvc diff --git a/castor/replier/ClientConnection.cpp b/castor/replier/ClientConnection.cpp index 6171d7924dacbf80fa81b3902dc7169629c7dcb3..901d87a3350d71461fe932c79d7361f10613d473 100644 --- a/castor/replier/ClientConnection.cpp +++ b/castor/replier/ClientConnection.cpp @@ -176,7 +176,7 @@ std::string castor::replier::ClientConnection::errorMessage() throw() { return m_errorMessage; } -void castor::replier::ClientConnection::setErrorMessage(std::string msg) throw () { +void castor::replier::ClientConnection::setErrorMessage(std::string msg) throw() { m_errorMessage = msg; } @@ -196,7 +196,7 @@ void castor::replier::ClientConnection::setStatus(enum RCStatus stat) } void castor::replier::ClientConnection::createSocket() - throw(castor::exception::Exception) { + { // Creating the socket int s = socket(AF_INET, SOCK_STREAM, 0); @@ -231,7 +231,7 @@ void castor::replier::ClientConnection::createSocket() } void castor::replier::ClientConnection::connect() - throw(castor::exception::Exception) { + { // Preparing the client address struct sockaddr_in saddr; @@ -258,7 +258,7 @@ void castor::replier::ClientConnection::connect() setStatus(CONNECTING); } -void castor::replier::ClientConnection::deleteNextMessage() throw(castor::exception::Exception) { +void castor::replier::ClientConnection::deleteNextMessage() { const char *func = "cc::deleteNextMessage "; if (!m_messages.empty()) { ClientResponse message = m_messages.front(); @@ -274,7 +274,7 @@ void castor::replier::ClientConnection::deleteNextMessage() throw(castor::excep } } -void castor::replier::ClientConnection::sendNextMessage() throw(castor::exception::Exception) { +void castor::replier::ClientConnection::sendNextMessage() { const char *func = "cc::sendNextMessage "; if (m_messages.empty()) { // "CC: No more messages in queue" @@ -291,7 +291,7 @@ void castor::replier::ClientConnection::sendNextMessage() throw(castor::excepti // Internal send method void castor::replier::ClientConnection::send() - throw(castor::exception::Exception) { + { const char *func = "ClientConnection::send "; castor::io::biniostream *response; diff --git a/castor/replier/ClientConnection.hpp b/castor/replier/ClientConnection.hpp index 71ce9b9f846402c3ae1ac5daf3d6244a797ad3b8..01f85d685512b2afdff77706ddf9d0522b7f3a50 100644 --- a/castor/replier/ClientConnection.hpp +++ b/castor/replier/ClientConnection.hpp @@ -162,29 +162,29 @@ namespace castor { /** * returns the connections' client */ - castor::rh::Client client() throw (); + castor::rh::Client client() throw(); /** * Indicates whether the connection should be terminated */ - bool terminate() throw (); + bool terminate() throw(); /** * Date of last event on the connection, used by the garbage collection */ - int lastEventDate() throw (); + int lastEventDate() throw(); /** * Get connection's file descriptor */ - int fd() throw (); + int fd() throw(); /** * Last error message on the connection */ - std::string errorMessage() throw (); - void setErrorMessage(std::string msg) throw (); + std::string errorMessage() throw(); + void setErrorMessage(std::string msg) throw(); /** * Returns the Response queue @@ -200,17 +200,17 @@ namespace castor { /** * Calls the socket system call and creates the socket */ - void createSocket() throw(castor::exception::Exception); + void createSocket() ; /** * performs the connect system call on the connection */ - void connect() throw(castor::exception::Exception); + void connect() ; /** * Sends one message through the connection */ - void sendNextMessage() throw(castor::exception::Exception); + void sendNextMessage() ; /** * Indicates whetehr there are messages to be sent, still @@ -220,7 +220,7 @@ namespace castor { /** * pops one response from the queue */ - void deleteNextMessage() throw(castor::exception::Exception); + void deleteNextMessage() ; /** * Representation of the client connection @@ -232,7 +232,7 @@ namespace castor { protected: - void send() throw(castor::exception::Exception); + void send() ; diff --git a/castor/replier/RequestReplier.cpp b/castor/replier/RequestReplier.cpp index fd23911f8a4e89853d2b2b36d9884b5b0a166c9d..d211ab564ee9a28aecdb7d66fdbe1af4dc4a1360 100644 --- a/castor/replier/RequestReplier.cpp +++ b/castor/replier/RequestReplier.cpp @@ -832,14 +832,14 @@ void castor::replier::RequestReplier::replyToClient(castor::IClient *client, castor::IObject *response, bool isLastResponse) - throw(castor::exception::Exception) { + { sendResponse(client, response, isLastResponse); } void castor::replier::RequestReplier::setCallback(void (*callback)(castor::IClient *, MajorConnectionStatus)) - throw(castor::exception::Exception) { + { const char *func = "rr::setCallback CLIENT"; @@ -874,7 +874,7 @@ void castor::replier::RequestReplier::sendResponse(castor::IClient *client, castor::IObject *response, bool isLastResponse) - throw(castor::exception::Exception) { + { const char *func = "rr::sendResponse CLIENT"; @@ -949,7 +949,7 @@ castor::replier::RequestReplier::sendResponse(castor::IClient *client, void castor::replier::RequestReplier::closeClientConnection (castor::IClient *client) - throw(castor::exception::Exception) { + { const char *func = "rr::closeClientConnection CLIENT"; diff --git a/castor/replier/RequestReplier.hpp b/castor/replier/RequestReplier.hpp index c936fa428dcb5a40691b83687fe2a035b683b552..3cde8ee924058371b4e9d1b84c9ff77100c3d8b5 100644 --- a/castor/replier/RequestReplier.hpp +++ b/castor/replier/RequestReplier.hpp @@ -70,7 +70,7 @@ namespace castor { void replyToClient(castor::IClient *client, castor::IObject *response, bool isLastResponse = false) - throw(castor::exception::Exception); + ; /** @@ -80,7 +80,7 @@ namespace castor { * @exception Exception in case of error */ void setCallback(void (*callback)(castor::IClient *, MajorConnectionStatus status)) - throw(castor::exception::Exception); + ; /** * Adds a client to the queue of clients waiting for a response. @@ -93,7 +93,7 @@ namespace castor { void sendResponse(castor::IClient *client, castor::IObject *response, bool isLastResponse = false) - throw(castor::exception::Exception); + ; /** @@ -102,7 +102,7 @@ namespace castor { * @exception Exception in case of error */ void closeClientConnection(castor::IClient *client) - throw(castor::exception::Exception); + ; /** diff --git a/castor/rh/IRHSvc.hpp b/castor/rh/IRHSvc.hpp index 0ab577e5f83e7d2a435f4c70f331fc9e785727a6..63dc4195c7ac3a1870370c06fe02e35d5a3cf108 100644 --- a/castor/rh/IRHSvc.hpp +++ b/castor/rh/IRHSvc.hpp @@ -56,7 +56,7 @@ namespace castor { * @exception throws Exception in case of errors, in particular in case of permission denial */ virtual void storeRequest(castor::stager::Request* req) - throw (castor::exception::Exception) = 0; + = 0; /** * change privileges for some users @@ -77,7 +77,7 @@ namespace castor { std::vector<castor::bwlist::BWUser*> users, std::vector<castor::bwlist::RequestType*> requestTypes, bool isAdd) - throw (castor::exception::Exception) = 0; + = 0; /** * list privileges @@ -98,7 +98,7 @@ namespace castor { listPrivileges (const std::string svcClassName, const int user, const int group, const int requestType) - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IRHSvc diff --git a/castor/rh/RHThread.cpp b/castor/rh/RHThread.cpp index 5720083b297f1de3b2c9715e7fd6762f43b9acb1..b705bebbe0e3cd24c560e12635179cc1137d03f6 100644 --- a/castor/rh/RHThread.cpp +++ b/castor/rh/RHThread.cpp @@ -59,7 +59,7 @@ pthread_once_t castor::rh::RHThread::s_rateLimiterOnce(PTHREAD_ONCE_INIT); // Cconstructor //------------------------------------------------------------------------------ castor::rh::RHThread::RHThread() - throw (castor::exception::Exception) : + : BaseObject() { // Statically initialize the list of stager service handlers for each @@ -110,7 +110,7 @@ castor::rh::RHThread::RHThread() //------------------------------------------------------------------------------ // destructor //------------------------------------------------------------------------------ -castor::rh::RHThread::~RHThread() throw () { +castor::rh::RHThread::~RHThread() throw() { /* This empty destructor has to be implemented here and NOT inline, otherwise the following error will happen at linking time: @@ -156,7 +156,7 @@ void castor::rh::RHThread::stop() { // makeRateLimiterKey //------------------------------------------------------------------------------ void castor::rh::RHThread::makeRateLimiterKey() - throw (castor::exception::Exception) { + { int rc = pthread_key_create(&s_rateLimiterKey, NULL); if (rc != 0) { castor::exception::Exception e(rc); @@ -170,7 +170,7 @@ void castor::rh::RHThread::makeRateLimiterKey() //------------------------------------------------------------------------------ castor::rh::RateLimiter * castor::rh::RHThread::getRateLimiterFromTLS() - throw (castor::exception::Exception) { + { // make a new key if we are in the first call to this { const int rc = pthread_once(&castor::rh::RHThread::s_rateLimiterOnce, @@ -545,7 +545,7 @@ void castor::rh::RHThread::run(void* param) { // handleRequest //------------------------------------------------------------------------------ unsigned int castor::rh::RHThread::handleRequest(castor::stager::Request* fr) - throw (castor::exception::Exception) { + { // get RH service castor::rh::IRHSvc* m_rhSvc = 0; diff --git a/castor/rh/RHThread.hpp b/castor/rh/RHThread.hpp index 319838f4908b4167224da03c108e049148aa7d93..a14468c877332ccebe16729b4e24c4515f1e83b0 100644 --- a/castor/rh/RHThread.hpp +++ b/castor/rh/RHThread.hpp @@ -49,7 +49,7 @@ namespace castor { /** * Constructor */ - RHThread() throw (castor::exception::Exception); + RHThread() ; /** * Destructor. See the cpp file for details. @@ -78,7 +78,7 @@ namespace castor { * small function that creates a thread-specific storage key * for the rate limiter */ - static void makeRateLimiterKey() throw (castor::exception::Exception); + static void makeRateLimiterKey() ; /** * Return a RateLimiter object from thread local storage @@ -86,7 +86,7 @@ namespace castor { * @return a RateLimiter object */ castor::rh::RateLimiter *getRateLimiterFromTLS() - throw (castor::exception::Exception); + ; /** * Handles an incoming request @@ -95,7 +95,7 @@ namespace castor { * @return the number of subrequests involved */ unsigned int handleRequest(castor::stager::Request* fr) - throw (castor::exception::Exception); + ; /// Hash table for mapping requests to svc handlers std::map<int, std::string> m_svcHandler; diff --git a/castor/rh/RateLimiter.cpp b/castor/rh/RateLimiter.cpp index d3ebbe7a4b3751cae7659f09392f950a1624b56f..7bba80ff2ff9e9cb4219be73d0e0c404f22ab3c8 100644 --- a/castor/rh/RateLimiter.cpp +++ b/castor/rh/RateLimiter.cpp @@ -45,7 +45,7 @@ // Constructor //----------------------------------------------------------------------------- castor::rh::RateLimiter::RateLimiter() - throw(castor::exception::Exception) : + : m_memc(0), m_servers(0), m_init(false) {} @@ -77,7 +77,7 @@ castor::rh::RateLimiter::~RateLimiter() // Init //----------------------------------------------------------------------------- void castor::rh::RateLimiter::init() - throw(castor::exception::Exception) { + { // Extract the RH/RateLimitServerList from castor.conf. This variable defines // a string of servers that the memcached library should use when storing @@ -185,7 +185,7 @@ castor::rh::RatingGroup * castor::rh::RateLimiter::checkAndUpdateLimit(const std::string user, const std::string group, const uint64_t nbRequests) - throw (castor::exception::Exception) { + { // Initialized ? if (!m_init) { @@ -336,7 +336,7 @@ castor::rh::RatingGroup * castor::rh::RateLimiter::checkAndUpdateLimit(const int euid, const int egid, const uint64_t nbRequests) - throw (castor::exception::Exception) { + { // Initialized ? if (!m_init) { diff --git a/castor/rh/RateLimiter.hpp b/castor/rh/RateLimiter.hpp index 9ff3ac77fc33b782656ff95e1e82f424389dfaa0..14b4d41da7ca7fdfdd1b7b2185a63c6196c52520 100644 --- a/castor/rh/RateLimiter.hpp +++ b/castor/rh/RateLimiter.hpp @@ -49,7 +49,7 @@ namespace castor { * Default constructor */ RateLimiter() - throw(castor::exception::Exception); + ; /** * Default destructor @@ -62,7 +62,7 @@ namespace castor { * in castor.conf */ void init() - throw(castor::exception::Exception); + ; /** * Method used to check if a user has exceeded their maximum number @@ -80,7 +80,7 @@ namespace castor { castor::rh::RatingGroup *checkAndUpdateLimit(const std::string user, const std::string group, const uint64_t nbRequests) - throw(castor::exception::Exception); + ; /** * Refer to previous method @@ -92,7 +92,7 @@ namespace castor { castor::rh::RatingGroup *checkAndUpdateLimit(const int euid, const int egid, const uint64_t nbRequests) - throw(castor::exception::Exception); + ; private: diff --git a/castor/rh/RatingGroup.cpp b/castor/rh/RatingGroup.cpp index fbaa9d58857270f43c2dcd1639d820b9633dd977..e7be7b338d9bbc25392f08d1d9c8071e4a26d48e 100644 --- a/castor/rh/RatingGroup.cpp +++ b/castor/rh/RatingGroup.cpp @@ -32,7 +32,7 @@ // Constructor //----------------------------------------------------------------------------- castor::rh::RatingGroup::RatingGroup(const std::string name) - throw(castor::exception::Exception) : + : m_nbRequests(0), m_interval(0), m_groupName(name) { diff --git a/castor/rh/RatingGroup.hpp b/castor/rh/RatingGroup.hpp index 911671ac8759073d51a9811a6a08bf99df17eecf..553974d6e98fbda801dc971eaf04001698463c0f 100644 --- a/castor/rh/RatingGroup.hpp +++ b/castor/rh/RatingGroup.hpp @@ -43,7 +43,7 @@ namespace castor { * @exception Exception in case of error */ RatingGroup(const std::string name) - throw(castor::exception::Exception); + ; /** * Default destructor diff --git a/castor/rh/Server.cpp b/castor/rh/Server.cpp index b168607496daabb0260f4e97b3876abcfb223770..ea61c9022a01b6ebb43f16f2d72657335cc7a289 100644 --- a/castor/rh/Server.cpp +++ b/castor/rh/Server.cpp @@ -171,7 +171,7 @@ void castor::rh::Server::help(std::string programName) //------------------------------------------------------------------------------ // parseCommandLine //------------------------------------------------------------------------------ -void castor::rh::Server::parseCommandLine(int argc, char *argv[]) throw (castor::exception::Exception) +void castor::rh::Server::parseCommandLine(int argc, char *argv[]) { bool foreground = false; // Should the daemon run in the foreground? Coptions_t longopts[] = diff --git a/castor/rh/Server.hpp b/castor/rh/Server.hpp index 51cc217c0de7e228844e741aa6976e07d6d8c083..0195efe91098a970e6816056497a271e903d00d7 100644 --- a/castor/rh/Server.hpp +++ b/castor/rh/Server.hpp @@ -74,7 +74,7 @@ namespace castor { * Overloaded method from BaseDaemon for individual command line parser */ virtual void parseCommandLine(int argc, char *argv[]) - throw(castor::exception::Exception); + ; /// The listening port int m_port; diff --git a/castor/server/AuthListenerThreadPool.cpp b/castor/server/AuthListenerThreadPool.cpp index 44d5844e3712a1cab7b1f5ee75ebb1ccb9f4898d..5c7ec43eeb32c2588a36e08a76b9fc2c1d747378 100644 --- a/castor/server/AuthListenerThreadPool.cpp +++ b/castor/server/AuthListenerThreadPool.cpp @@ -37,7 +37,7 @@ castor::server::AuthListenerThreadPool::AuthListenerThreadPool castor::server::IThread* thread, unsigned int listenPort, bool waitIfBusy, - unsigned int nbThreads) throw(castor::exception::Exception) : + unsigned int nbThreads) : TCPListenerThreadPool(poolName, thread, listenPort, waitIfBusy, nbThreads) {} //------------------------------------------------------------------------------ @@ -51,7 +51,7 @@ castor::server::AuthListenerThreadPool::AuthListenerThreadPool unsigned int initThreads, unsigned int maxThreads, unsigned int threshold, - unsigned int maxTasks) throw(castor::exception::Exception) : + unsigned int maxTasks) : TCPListenerThreadPool(poolName, thread, listenPort, waitIfBusy, initThreads, maxThreads, threshold, maxTasks) {} @@ -64,7 +64,7 @@ castor::server::AuthListenerThreadPool::~AuthListenerThreadPool() throw() {} // bind //------------------------------------------------------------------------------ void castor::server::AuthListenerThreadPool::bind() - throw (castor::exception::Exception) { + { // Create a secure socket for the server, bind, and listen m_sock = new castor::io::AuthServerSocket(m_port, true); } diff --git a/castor/server/AuthListenerThreadPool.hpp b/castor/server/AuthListenerThreadPool.hpp index 3c3ead3f30b7e312ea5a3cfe14a6428669b56d79..48624f3b155f959cf536b57fc94974af63a7c8e7 100644 --- a/castor/server/AuthListenerThreadPool.hpp +++ b/castor/server/AuthListenerThreadPool.hpp @@ -50,7 +50,7 @@ namespace castor { unsigned int listenPort, bool waitIfBusy = true, unsigned int nbThreads = DEFAULT_THREAD_NUMBER) - throw (castor::exception::Exception); + ; /** * Inherited constructor, see TCPListenerThreadPool @@ -61,7 +61,7 @@ namespace castor { unsigned int initThreads, unsigned int maxThreads, unsigned int threshold = DEFAULT_THRESHOLD, unsigned int maxTasks = DEFAULT_MAXTASKS) - throw (castor::exception::Exception); + ; /** * Destructor @@ -73,7 +73,7 @@ namespace castor { /** * Performs the bind with an AuthServerSocket here */ - virtual void bind() throw (castor::exception::Exception); + virtual void bind() ; }; diff --git a/castor/server/BaseThreadPool.cpp b/castor/server/BaseThreadPool.cpp index 7c0a4e00c253452264550c086a1e0316ad55993b..790402542180368690a89da81bc619846982ec74 100644 --- a/castor/server/BaseThreadPool.cpp +++ b/castor/server/BaseThreadPool.cpp @@ -43,7 +43,7 @@ castor::server::BaseThreadPool::BaseThreadPool(const std::string poolName, castor::server::IThread* thread, unsigned int nbThreads) -throw (castor::exception::Exception) : + : BaseObject(), m_nbThreads(nbThreads), m_poolName(poolName), @@ -73,7 +73,7 @@ castor::server::BaseThreadPool::~BaseThreadPool() throw() //------------------------------------------------------------------------------ // init //------------------------------------------------------------------------------ -void castor::server::BaseThreadPool::init() throw (castor::exception::Exception) +void castor::server::BaseThreadPool::init() { // Enable internal monitoring if the metrics collector has already // been instantiated by the user application @@ -94,7 +94,7 @@ void castor::server::BaseThreadPool::init() throw (castor::exception::Exception) //------------------------------------------------------------------------------ // run //------------------------------------------------------------------------------ -void castor::server::BaseThreadPool::run() throw (castor::exception::Exception) +void castor::server::BaseThreadPool::run() { castor::exception::Exception notImpl; notImpl.getMessage() << diff --git a/castor/server/BaseThreadPool.hpp b/castor/server/BaseThreadPool.hpp index 0e23d10609a02eaa7ce5a1f71e3b378908e89212..3f36dc109d612478114ad8dc25bfe2c78523c8c0 100644 --- a/castor/server/BaseThreadPool.hpp +++ b/castor/server/BaseThreadPool.hpp @@ -57,7 +57,7 @@ namespace castor { BaseThreadPool(const std::string poolName, castor::server::IThread* thread, unsigned int nbThreads = DEFAULT_THREAD_NUMBER) - throw (castor::exception::Exception); + ; /* * Destructor @@ -68,7 +68,7 @@ namespace castor { * Initializes the pool. This function is called before * any forking may take place. */ - virtual void init() throw (castor::exception::Exception); + virtual void init() ; /** * Runs the pool. This function is supposed to spawn @@ -76,7 +76,7 @@ namespace castor { * Specialized pools implement it according to their needs, * this implementation throws an exception. */ - virtual void run() throw (castor::exception::Exception); + virtual void run() ; /** * Performs a graceful shutdown of the pool. This method is diff --git a/castor/server/Daemon.cpp b/castor/server/Daemon.cpp index 2759086b9382dbea54d88a35b25c2574b3d18982..dbc2ac9c05c51891cddd587968d19028eb7e3cef 100644 --- a/castor/server/Daemon.cpp +++ b/castor/server/Daemon.cpp @@ -55,7 +55,7 @@ castor::server::Daemon::~Daemon() throw() { // parseCommandLine //------------------------------------------------------------------------------ void castor::server::Daemon::parseCommandLine(int argc, - char *argv[]) throw(castor::exception::Exception) { + char *argv[]) { Coptions_t longopts[4]; longopts[0].name = "foreground"; @@ -136,7 +136,7 @@ void castor::server::Daemon::runAsStagerSuperuser() throw() { // getForeground //------------------------------------------------------------------------------ bool castor::server::Daemon::getForeground() const - throw(castor::exception::CommandLineNotParsed) { + { if(!m_commandLineHasBeenParsed) { castor::exception::CommandLineNotParsed ex; ex.getMessage() << @@ -161,7 +161,7 @@ void castor::server::Daemon::setCommandLineHasBeenParsed(const bool foreground) // dlfInit //----------------------------------------------------------------------------- void castor::server::Daemon::dlfInit(castor::dlf::Message messages[]) - throw (castor::exception::Exception) { + { castor::dlf::dlf_init((char*)m_log.getProgramName().c_str(), messages); // Add framework specific messages castor::dlf::Message frameworkMessages[] = @@ -192,7 +192,7 @@ void castor::server::Daemon::dlfInit(castor::dlf::Message messages[]) // daemonizeIfNotRunInForeground //------------------------------------------------------------------------------ void castor::server::Daemon::daemonizeIfNotRunInForeground() - throw (castor::exception::Exception) { + { // Do nothing if already a daemon if (1 == getppid()) { return; diff --git a/castor/server/Daemon.hpp b/castor/server/Daemon.hpp index be37c8a18fb42d490173c5a5d0af5a1e894bc372..391d3a504ad2fb3135db5b587c29dc1847caf747 100644 --- a/castor/server/Daemon.hpp +++ b/castor/server/Daemon.hpp @@ -63,7 +63,7 @@ public: * @param argv The command-line vector. */ virtual void parseCommandLine(int argc, char *argv[]) - throw(castor::exception::Exception); + ; /** * Prints out the online help @@ -86,7 +86,7 @@ public: /** * Returns true if the daemon is configured to run in the foreground. */ - bool getForeground() const throw(castor::exception::CommandLineNotParsed); + bool getForeground() const ; protected: @@ -106,7 +106,7 @@ protected: * @param messages the messages to be passed to dlf_init */ void dlfInit(castor::dlf::Message messages[]) - throw (castor::exception::Exception); + ; /** * Daemonizes the daemon if it has not been configured to run in the @@ -118,7 +118,7 @@ protected: * or background mode (m_foreground) and whether or not the user of daemon * should be changed to the stager superuser (m_runAsStagerSuperuser). */ - void daemonizeIfNotRunInForeground() throw(castor::exception::Exception); + void daemonizeIfNotRunInForeground() ; /** * Sends a notification message to the given host,port diff --git a/castor/server/DbAlertedThreadPool.cpp b/castor/server/DbAlertedThreadPool.cpp index 1219fee76d0a76df9bd707cc6c519ed0760ff05d..d9177a4a4870659a17c716ea499570352c467249 100644 --- a/castor/server/DbAlertedThreadPool.cpp +++ b/castor/server/DbAlertedThreadPool.cpp @@ -41,7 +41,7 @@ extern "C" { castor::server::DbAlertedThreadPool::DbAlertedThreadPool(const std::string poolName, castor::server::SelectProcessThread* thread, const unsigned int nbThreads) - throw(castor::exception::Exception) : + : BaseThreadPool(poolName, thread, nbThreads) { // Initialize global mutexes @@ -94,7 +94,7 @@ bool castor::server::DbAlertedThreadPool::shutdown(bool wait) throw() // run //------------------------------------------------------------------------------ void castor::server::DbAlertedThreadPool::run() - throw (castor::exception::Exception) + { if(m_nbThreads == 0) { return; diff --git a/castor/server/DbAlertedThreadPool.hpp b/castor/server/DbAlertedThreadPool.hpp index 78d393450bbb1010a608b4325d209151f1fe5c1b..f22f484681379e97fc098574de75c3cfd7efec10 100644 --- a/castor/server/DbAlertedThreadPool.hpp +++ b/castor/server/DbAlertedThreadPool.hpp @@ -67,7 +67,7 @@ namespace castor { DbAlertedThreadPool(const std::string poolName, castor::server::SelectProcessThread* thread, const unsigned int nbThreads = DEFAULT_THREAD_NUMBER) - throw (castor::exception::Exception); + ; /** * Destructor @@ -77,7 +77,7 @@ namespace castor { /** * Creates and runs the pool starting the threads in detached mode. */ - virtual void run() throw (castor::exception::Exception); + virtual void run() ; /** * Shutdowns the pool. @@ -85,7 +85,7 @@ namespace castor { * pool to terminate. * @return true iff no thread is active (i.e. m_nbActiveThreads == 0). */ - virtual bool shutdown(bool wait = true) throw (); + virtual bool shutdown(bool wait = true) throw(); private: diff --git a/castor/server/DynamicThreadPool.cpp b/castor/server/DynamicThreadPool.cpp index 61e1ee0fc596fb7574314f37983f64339c815d9d..c4c40664e8d3e547780268e5c90f64618e93f1d4 100644 --- a/castor/server/DynamicThreadPool.cpp +++ b/castor/server/DynamicThreadPool.cpp @@ -40,7 +40,7 @@ castor::server::DynamicThreadPool::DynamicThreadPool unsigned int maxThreads, unsigned int threshold, unsigned int maxTasks) - throw(castor::exception::Exception) : + : BaseThreadPool(poolName, consumerThread, 0), m_taskQueue(maxTasks), m_producerThread(producerThread), @@ -119,7 +119,7 @@ void castor::server::DynamicThreadPool::setNbThreads(unsigned int value) { // init //----------------------------------------------------------------------------- void castor::server::DynamicThreadPool::init() - throw (castor::exception::Exception) { + { castor::server::BaseThreadPool::init(); @@ -140,7 +140,7 @@ void castor::server::DynamicThreadPool::init() // run //----------------------------------------------------------------------------- void castor::server::DynamicThreadPool::run() - throw (castor::exception::Exception) { + { pthread_t t; int rv; @@ -417,7 +417,7 @@ void* castor::server::DynamicThreadPool::_consumer(void *arg) { // addTask //----------------------------------------------------------------------------- void castor::server::DynamicThreadPool::addTask(void *data, bool wait) - throw(castor::exception::Exception) { + { // Variables pthread_t t; diff --git a/castor/server/DynamicThreadPool.hpp b/castor/server/DynamicThreadPool.hpp index c99840b1834978682ee6b038043f3ccdf9ce61ea..934fbb2775763399acea906bef68925ca462e141 100644 --- a/castor/server/DynamicThreadPool.hpp +++ b/castor/server/DynamicThreadPool.hpp @@ -100,7 +100,7 @@ namespace castor { unsigned int maxThreads = DEFAULT_MAXTHREADS, unsigned int threshold = DEFAULT_THRESHOLD, unsigned int maxTasks = DEFAULT_MAXTASKS) - throw(castor::exception::Exception); + ; /** * Default Destructor @@ -111,12 +111,12 @@ namespace castor { * Initializes the pool. This function is called before * any forking may take place. */ - virtual void init() throw (castor::exception::Exception); + virtual void init() ; /** * Creates and starts the threads */ - virtual void run() throw (castor::exception::Exception); + virtual void run() ; /** * Shutdowns the pool by terminating the task queue. @@ -147,7 +147,7 @@ namespace castor { * to be non-blocking. */ void addTask(void *data, bool wait = true) - throw(castor::exception::Exception); + ; /** * Functions returning queue related metrics diff --git a/castor/server/ForkedProcessPool.cpp b/castor/server/ForkedProcessPool.cpp index b54ede141982ce5b9a8b90cb86f129b1898ccaee..c3759b92754026cb9463b800060c42fd37046e32 100644 --- a/castor/server/ForkedProcessPool.cpp +++ b/castor/server/ForkedProcessPool.cpp @@ -49,7 +49,7 @@ static bool _childStop = false; //------------------------------------------------------------------------------ castor::server::ForkedProcessPool::ForkedProcessPool (const std::string poolName, castor::server::IThread* thread) - throw(castor::exception::Exception) : + : BaseThreadPool(poolName, thread), m_childPid(0), m_writeHighFd(0) { @@ -95,7 +95,7 @@ bool castor::server::ForkedProcessPool::shutdown(bool) throw() // init //------------------------------------------------------------------------------ void castor::server::ForkedProcessPool::init() - throw (castor::exception::Exception) + { castor::server::BaseThreadPool::init(); @@ -153,7 +153,7 @@ void castor::server::ForkedProcessPool::init() // run //------------------------------------------------------------------------------ void castor::server::ForkedProcessPool::run() - throw (castor::exception::Exception) + { // we already forked all processes, so not much to do here // open dispatch @@ -173,7 +173,7 @@ void castor::server::ForkedProcessPool::run() // dispatch //------------------------------------------------------------------------------ void castor::server::ForkedProcessPool::dispatch(castor::IObject& obj) - throw (castor::exception::Exception) + { if (m_stopped) { return; diff --git a/castor/server/ForkedProcessPool.hpp b/castor/server/ForkedProcessPool.hpp index cc54e66d4985508a279458c9d4905c20b5ec81d6..0e8fd6acbd355dda4a1ad14d7e40becba6992635 100644 --- a/castor/server/ForkedProcessPool.hpp +++ b/castor/server/ForkedProcessPool.hpp @@ -50,7 +50,7 @@ namespace castor { */ ForkedProcessPool(const std::string poolName, castor::server::IThread* thread) - throw (castor::exception::Exception); + ; /* * destructor @@ -61,18 +61,18 @@ namespace castor { * Creates the pool by forking children processes. * The parent process returns, children processes call childRun. */ - virtual void init() throw (castor::exception::Exception); + virtual void init() ; /** * Shutdowns the pool. Kills all children. */ - virtual bool shutdown(bool wait) throw (); + virtual bool shutdown(bool wait) throw(); /** * Runs the pool. The forking phase is done in init, thus this * method is almost empty. */ - virtual void run() throw (castor::exception::Exception); + virtual void run() ; /** * Entry point to dispatch a task to an idle process @@ -80,7 +80,7 @@ namespace castor { * through the pipe fails. */ void dispatch(castor::IObject& obj) - throw (castor::exception::Exception); + ; protected: diff --git a/castor/server/ListenerThreadPool.cpp b/castor/server/ListenerThreadPool.cpp index 981b8c11c600c3530c2a41c86a982063f78914d4..837925196e5efe272bb0e10b57a5097a6eacb6e8 100644 --- a/castor/server/ListenerThreadPool.cpp +++ b/castor/server/ListenerThreadPool.cpp @@ -37,7 +37,7 @@ castor::server::ListenerThreadPool::ListenerThreadPool(const std::string poolNam unsigned int listenPort, bool waitIfBusy, unsigned int nbThreads) - throw(castor::exception::Exception) : + : DynamicThreadPool(poolName, thread, 0, nbThreads, nbThreads), m_sock(0), m_port(listenPort), m_waitIfBusy(waitIfBusy) {} @@ -52,7 +52,7 @@ castor::server::ListenerThreadPool::ListenerThreadPool(const std::string poolNam unsigned int maxThreads, unsigned int threshold, unsigned int maxTasks) - throw(castor::exception::Exception) : + : DynamicThreadPool(poolName, thread, 0, initThreads, maxThreads, threshold, maxTasks), m_sock(0), m_port(listenPort), m_waitIfBusy(waitIfBusy) {} @@ -64,7 +64,7 @@ castor::server::ListenerThreadPool::~ListenerThreadPool() throw() {} //------------------------------------------------------------------------------ // run //------------------------------------------------------------------------------ -void castor::server::ListenerThreadPool::run() throw (castor::exception::Exception) { +void castor::server::ListenerThreadPool::run() { // bind the socket (this can fail, we just propagate the exception) bind(); diff --git a/castor/server/ListenerThreadPool.hpp b/castor/server/ListenerThreadPool.hpp index 14c0aad993907ee16fa74e73da87e50509c896c7..ec473e518c9973fdfd440eee22422041a57a5731 100644 --- a/castor/server/ListenerThreadPool.hpp +++ b/castor/server/ListenerThreadPool.hpp @@ -58,7 +58,7 @@ namespace castor { unsigned int listenPort, bool waitIfBusy, unsigned int nbThreads = DEFAULT_THREAD_NUMBER) - throw (castor::exception::Exception); + ; /** * Constructor for a listener with a dynamic number of threads. @@ -75,7 +75,7 @@ namespace castor { unsigned int maxThreads, unsigned int threshold = DEFAULT_THRESHOLD, unsigned int maxTasks = DEFAULT_MAXTASKS) - throw (castor::exception::Exception); + ; /** * Destructor @@ -85,7 +85,7 @@ namespace castor { /** * Starts the pool and the listener loop to accept connections. */ - virtual void run() throw (castor::exception::Exception); + virtual void run() ; /** * Shutdowns the pool by calling the ancestor's shutdown @@ -107,7 +107,7 @@ namespace castor { * this method according to the type of socket they need to use. * @throw castor::exception::Exception if the port is busy. */ - virtual void bind() throw (castor::exception::Exception) = 0; + virtual void bind() = 0; /** * The listening loop implementation for this Listener. diff --git a/castor/server/MultiThreadedDaemon.cpp b/castor/server/MultiThreadedDaemon.cpp index 31eda840b53801046aa567d54138cad39fbb5316..0d7bb5d715d383360e5ee1f9311298d9acf37b76 100644 --- a/castor/server/MultiThreadedDaemon.cpp +++ b/castor/server/MultiThreadedDaemon.cpp @@ -47,7 +47,7 @@ castor::server::MultiThreadedDaemon::~MultiThreadedDaemon() throw() { // parseCommandLine //------------------------------------------------------------------------------ void castor::server::MultiThreadedDaemon::parseCommandLine(int argc, - char *argv[]) throw(castor::exception::Exception) { + char *argv[]) { bool foreground = false; // Should the daemon run in the foreground? Coptions_t* longopts = new Coptions_t[m_threadPools.size() + 5]; char tparam[] = "Xthreads"; @@ -156,7 +156,7 @@ void castor::server::MultiThreadedDaemon::addThreadPool( // start //------------------------------------------------------------------------------ void castor::server::MultiThreadedDaemon::start() - throw(castor::exception::Exception) { + { if (getForeground()) { m_stdOut << "Starting " << getServerName() << std::endl; } @@ -189,7 +189,7 @@ void castor::server::MultiThreadedDaemon::start() // setUpMultiThreadedSignalHandling //------------------------------------------------------------------------------ void castor::server::MultiThreadedDaemon::setupMultiThreadedSignalHandling() - throw (castor::exception::Exception) { + { // Initialize mutex variable in case of a signal. Timeout = 10 seconds try { m_signalMutex = new Mutex(0); @@ -392,7 +392,7 @@ void castor::server::MultiThreadedDaemon::resetAllMetrics() throw() { //------------------------------------------------------------------------------ castor::server::BaseThreadPool * castor::server::MultiThreadedDaemon::getThreadPool(const char nameIn) - throw (castor::exception::Exception) { + { std::map<const char, BaseThreadPool*>::const_iterator tpIt = m_threadPools.find(nameIn); if(tpIt == m_threadPools.end()) { diff --git a/castor/server/MultiThreadedDaemon.hpp b/castor/server/MultiThreadedDaemon.hpp index 64ebb587bd0c6110a4829e890be8c5e584236b4d..f26035f63fed4adac9d2b9cedecc45b10bd00f9a 100644 --- a/castor/server/MultiThreadedDaemon.hpp +++ b/castor/server/MultiThreadedDaemon.hpp @@ -67,7 +67,7 @@ public: * @throw castor::exception::Exception in case it was not found */ BaseThreadPool* getThreadPool(const char nameIn) - throw (castor::exception::Exception); + ; /** * Calls resetMetrics on all registered thread pools @@ -84,7 +84,7 @@ public: /** * Starts all the thread pools */ - void start() throw (castor::exception::Exception); + void start() ; /** * Adds a dedicated UDP thread pool for getting wakeup notifications @@ -101,7 +101,7 @@ public: * @param argv The command-line vector. */ virtual void parseCommandLine(int argc, char *argv[]) - throw(castor::exception::Exception); + ; protected: @@ -115,7 +115,7 @@ protected: * waits for all threads to terminate before returning. * This implements a graceful kill and is triggered by SIGTERM. */ - virtual void waitAllThreads() throw (); + virtual void waitAllThreads() throw(); /** * Prints out the online help @@ -127,7 +127,7 @@ private: /** * Sets up the signal handling for this multi-threaded daemon. */ - void setupMultiThreadedSignalHandling() throw(castor::exception::Exception); + void setupMultiThreadedSignalHandling() ; /** * Handles signals and performs graceful/immediate stop. diff --git a/castor/server/Mutex.cpp b/castor/server/Mutex.cpp index a0c6032cdbdf1eeed50e65efd7249c43d7d7aaf3..f6dc90526a0bb212165d5359b04738be446d91d1 100644 --- a/castor/server/Mutex.cpp +++ b/castor/server/Mutex.cpp @@ -32,7 +32,7 @@ // constructor //------------------------------------------------------------------------------ castor::server::Mutex::Mutex(int value, unsigned int timeout) - throw (castor::exception::Exception) : + : m_var(value), m_timeout(timeout), m_mutexCthread(0) { if(createLock() != 0) { @@ -75,7 +75,7 @@ int castor::server::Mutex::createLock() // setValue //------------------------------------------------------------------------------ void castor::server::Mutex::setValue(int newValue) - throw (castor::exception::Exception) + { int oldValue = m_var; lock(); @@ -117,7 +117,7 @@ void castor::server::Mutex::wait() //------------------------------------------------------------------------------ // lock //------------------------------------------------------------------------------ -void castor::server::Mutex::lock() throw (castor::exception::Exception) +void castor::server::Mutex::lock() { if (m_mutexCthread == 0 || Cthread_mutex_timedlock_ext(m_mutexCthread, m_timeout) != 0) { @@ -130,7 +130,7 @@ void castor::server::Mutex::lock() throw (castor::exception::Exception) //------------------------------------------------------------------------------ // release //------------------------------------------------------------------------------ -void castor::server::Mutex::release() throw (castor::exception::Exception) +void castor::server::Mutex::release() { if(Cthread_mutex_unlock_ext(m_mutexCthread) != 0) { castor::exception::Exception ex; @@ -142,7 +142,7 @@ void castor::server::Mutex::release() throw (castor::exception::Exception) //------------------------------------------------------------------------------ // signal //------------------------------------------------------------------------------ -void castor::server::Mutex::signal() throw (castor::exception::Exception) +void castor::server::Mutex::signal() { if (m_mutexCthread == 0 || Cthread_cond_signal_ext(m_mutexCthread) != 0) { diff --git a/castor/server/Mutex.hpp b/castor/server/Mutex.hpp index a32d6ebdd3bc31861155f7ee9b204a458d275c26..a78b9986958208c7ee260e41627c9d698786b551 100644 --- a/castor/server/Mutex.hpp +++ b/castor/server/Mutex.hpp @@ -48,7 +48,7 @@ namespace castor { * @param timeout interval to be used in Cthread calls. */ Mutex(int value, unsigned int timeout = TIMEOUT) - throw (castor::exception::Exception); + ; /** * Destructor @@ -70,7 +70,7 @@ namespace castor { * acquired or the mutex initialization failed. */ void setValue(int newValue) - throw (castor::exception::Exception); + ; /** * Sets the internal variable value. @@ -98,17 +98,17 @@ namespace castor { /** * Tries to get a lock on this mutex. */ - void lock() throw (castor::exception::Exception); + void lock() ; /** * Tries to release the lock on this mutex. */ - void release() throw (castor::exception::Exception); + void release() ; /** * Tries to signal the mutex by calling Cthread_cond_signal(). */ - void signal() throw (castor::exception::Exception); + void signal() ; private: diff --git a/castor/server/NotifierThread.cpp b/castor/server/NotifierThread.cpp index 53b713add603ca279776b7bd29ed12f676831a58..6880bf4d2e154f610f426addb67e6aecf7854469 100644 --- a/castor/server/NotifierThread.cpp +++ b/castor/server/NotifierThread.cpp @@ -70,7 +70,7 @@ void castor::server::NotifierThread::run(void* param) { //------------------------------------------------------------------------------ // doNotify //------------------------------------------------------------------------------ -void castor::server::NotifierThread::doNotify(char tpName, int nbThreads) throw () { +void castor::server::NotifierThread::doNotify(char tpName, int nbThreads) throw() { castor::server::SignalThreadPool* pool = 0; try { // first resolve the pool diff --git a/castor/server/NotifierThread.hpp b/castor/server/NotifierThread.hpp index f22e72191c10c51be477f54ca305e74c58f7bb6f..88a8255db1d4eb1324d1a56b3f1e051f5f3d01eb 100644 --- a/castor/server/NotifierThread.hpp +++ b/castor/server/NotifierThread.hpp @@ -72,7 +72,7 @@ namespace castor { * Performs the notification by signalling the appropriate * condition variable */ - void doNotify(char tpName, int nbThreads = 1) throw (); + void doNotify(char tpName, int nbThreads = 1) throw(); private: diff --git a/castor/server/Queue.cpp b/castor/server/Queue.cpp index bebfe025eec67aeee951b45c22cc856c91a087fa..42522e78286f90d4b2828f8d9d6365fa403f1f36 100644 --- a/castor/server/Queue.cpp +++ b/castor/server/Queue.cpp @@ -31,7 +31,7 @@ // Constructor //----------------------------------------------------------------------------- castor::server::Queue::Queue(unsigned int size) - throw(castor::exception::Exception) : + : m_bounds(size), m_terminated(false), m_nbWriters(0), @@ -90,7 +90,7 @@ castor::server::Queue::~Queue() { // Push //----------------------------------------------------------------------------- void castor::server::Queue::push(void *data, bool wait) - throw(castor::exception::Exception) { + { // Check if the queue has been terminated if (m_terminated) { @@ -146,7 +146,7 @@ void castor::server::Queue::push(void *data, bool wait) // Pop //----------------------------------------------------------------------------- void castor::server::Queue::pop(bool wait, QueueElement& qe) - throw(castor::exception::Exception) { + { // Check if the queue has been terminated if (m_terminated) { diff --git a/castor/server/Queue.hpp b/castor/server/Queue.hpp index 3036ff606e3f1de8c6261b198e73e11925627665..2ad2e3e7f8ace52eb9c077ab841d2088a8bd2f5f 100644 --- a/castor/server/Queue.hpp +++ b/castor/server/Queue.hpp @@ -65,7 +65,7 @@ namespace castor { * @exception Exception in case of error. */ Queue(unsigned int size = DEFAULT_QUEUE_BOUNDS) - throw(castor::exception::Exception); + ; /** * Default Destructor @@ -90,7 +90,7 @@ namespace castor { * allocated to the object. If not, memory leaks will be observed. */ void push(void *data, bool wait = true) - throw(castor::exception::Exception); + ; /** * Retrieve an element from the front of the queue @@ -106,7 +106,7 @@ namespace castor { * EINTR: The blocking was interrupted (try again) */ void pop(bool wait, QueueElement& qe) - throw(castor::exception::Exception); + ; /** * Returns the number of elements in the queue diff --git a/castor/server/SignalThreadPool.cpp b/castor/server/SignalThreadPool.cpp index 8c4949710cf6377577d477f160540b991591d9ed..c2fc15fa915a4b16e5504fa2e67a1064897b222f 100644 --- a/castor/server/SignalThreadPool.cpp +++ b/castor/server/SignalThreadPool.cpp @@ -41,7 +41,7 @@ castor::server::SignalThreadPool::SignalThreadPool(const std::string poolName, const int timeout, const unsigned int nbThreads, const unsigned int startingThreads) - throw(castor::exception::Exception) : + : BaseThreadPool(poolName, thread, nbThreads), m_poolMutex(-1, (unsigned)timeout), m_notified(startingThreads) {} @@ -91,7 +91,7 @@ bool castor::server::SignalThreadPool::shutdown(bool wait) throw() // run //------------------------------------------------------------------------------ void castor::server::SignalThreadPool::run() - throw (castor::exception::Exception) + { if(m_nbThreads == 0) { return; @@ -130,7 +130,7 @@ void castor::server::SignalThreadPool::run() // waitSignalOrTimeout //------------------------------------------------------------------------------ void castor::server::SignalThreadPool::waitSignalOrTimeout() - throw (castor::exception::Exception) + { m_poolMutex.lock(); diff --git a/castor/server/SignalThreadPool.hpp b/castor/server/SignalThreadPool.hpp index 84c1b9e88cb8120a855c4ab81a93337fbce7b93d..59f56252a4e04a4d54a0e525e18bb05d8772a6d1 100644 --- a/castor/server/SignalThreadPool.hpp +++ b/castor/server/SignalThreadPool.hpp @@ -80,7 +80,7 @@ namespace castor { const int timeout = castor::server::Mutex::TIMEOUT, const unsigned int nbThreads = DEFAULT_THREAD_NUMBER, const unsigned int startingThreads = 1) - throw (castor::exception::Exception); + ; /** * Destructor @@ -90,7 +90,7 @@ namespace castor { /** * Creates and runs the pool starting the threads in detached mode. */ - virtual void run() throw (castor::exception::Exception); + virtual void run() ; /** * Shutdowns the pool. @@ -98,7 +98,7 @@ namespace castor { * pool to terminate. * @return true iff no thread is active (i.e. m_nbActiveThreads == 0). */ - virtual bool shutdown(bool wait = true) throw (); + virtual bool shutdown(bool wait = true) throw(); private: @@ -108,7 +108,7 @@ namespace castor { * @throw Exception if a mutex call fails */ void waitSignalOrTimeout() - throw (castor::exception::Exception); + ; /// mutex used by the threads to safely access this class' fields Mutex m_poolMutex; diff --git a/castor/server/TCPListenerThreadPool.cpp b/castor/server/TCPListenerThreadPool.cpp index e59b230754385eee89cfda5feb2637b7ce47bd64..6d73db8937e2072cafd29fbb5123188bdd1cca44 100644 --- a/castor/server/TCPListenerThreadPool.cpp +++ b/castor/server/TCPListenerThreadPool.cpp @@ -38,7 +38,7 @@ castor::server::TCPListenerThreadPool::TCPListenerThreadPool castor::server::IThread* thread, unsigned int listenPort, bool waitIfBusy, - unsigned int nbThreads) throw(castor::exception::Exception) : + unsigned int nbThreads) : ListenerThreadPool(poolName, thread, listenPort, waitIfBusy, nbThreads) {} //------------------------------------------------------------------------------ @@ -52,7 +52,7 @@ castor::server::TCPListenerThreadPool::TCPListenerThreadPool unsigned int initThreads, unsigned int maxThreads, unsigned int threshold, - unsigned int maxTasks) throw(castor::exception::Exception) : + unsigned int maxTasks) : ListenerThreadPool(poolName, thread, listenPort, waitIfBusy, initThreads, maxThreads, threshold, maxTasks) {} @@ -64,7 +64,7 @@ castor::server::TCPListenerThreadPool::~TCPListenerThreadPool() throw() {} //------------------------------------------------------------------------------ // bind //------------------------------------------------------------------------------ -void castor::server::TCPListenerThreadPool::bind() throw (castor::exception::Exception) { +void castor::server::TCPListenerThreadPool::bind() { // Create a socket for the server, bind, and listen m_sock = new castor::io::ServerSocket(m_port, true); } diff --git a/castor/server/TCPListenerThreadPool.hpp b/castor/server/TCPListenerThreadPool.hpp index 183ccd00befb4acc54d3f71c5ec2353a9568998e..2f70fae5e5912c81437e6d148764c98972a8654a 100644 --- a/castor/server/TCPListenerThreadPool.hpp +++ b/castor/server/TCPListenerThreadPool.hpp @@ -61,7 +61,7 @@ namespace castor { unsigned int listenPort, bool waitIfBusy = true, unsigned int nbThreads = DEFAULT_THREAD_NUMBER) - throw (castor::exception::Exception); + ; /** * Constructor for a TCP listener with a dynamic number of threads. @@ -77,7 +77,7 @@ namespace castor { unsigned int initThreads, unsigned int maxThreads, unsigned int threshold = DEFAULT_THRESHOLD, unsigned int maxTasks = DEFAULT_MAXTASKS) - throw (castor::exception::Exception); + ; /** * Destructor @@ -90,7 +90,7 @@ namespace castor { * Binds a standard ServerSocket to the given port. * @throw castor::exception::Exception if the port is busy. */ - virtual void bind() throw (castor::exception::Exception); + virtual void bind() ; /** * The listening loop implementation for this Listener, based on standard ServerSocket. diff --git a/castor/server/UDPListenerThreadPool.cpp b/castor/server/UDPListenerThreadPool.cpp index ccbf2ddd7a8fb8262a0a8c71dd01f20c8af89475..74e4269071953a09c263a8fbe6c98a9447a8b17a 100644 --- a/castor/server/UDPListenerThreadPool.cpp +++ b/castor/server/UDPListenerThreadPool.cpp @@ -45,7 +45,7 @@ castor::server::UDPListenerThreadPool::UDPListenerThreadPool // bind //------------------------------------------------------------------------------ void castor::server::UDPListenerThreadPool::bind() - throw (castor::exception::Exception) { + { m_sock = new castor::io::UDPSocket(m_port, true, true); } diff --git a/castor/server/UDPListenerThreadPool.hpp b/castor/server/UDPListenerThreadPool.hpp index c472bb2e3e68ed962469cfb462a5902930a2e5ce..c646b0cb2f73686b19a47c9039ac92be9fb44b3b 100644 --- a/castor/server/UDPListenerThreadPool.hpp +++ b/castor/server/UDPListenerThreadPool.hpp @@ -67,7 +67,7 @@ namespace castor { * Binds a standard UDPSocket to the given port. * @throw castor::exception::Exception if the port is busy. */ - virtual void bind() throw (castor::exception::Exception); + virtual void bind() ; /** * The listening loop implementation for this Listener, based on standard UDPSocket. diff --git a/castor/stager/ICommonSvc.hpp b/castor/stager/ICommonSvc.hpp index 44383a23816224d66d554c9d108bc1b4a7c1e2b4..7513984d95aa60271455d5d10064ab5786f79b64 100644 --- a/castor/stager/ICommonSvc.hpp +++ b/castor/stager/ICommonSvc.hpp @@ -66,7 +66,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::Request* requestToDo(std::string service) - throw (castor::exception::Exception) = 0; + = 0; }; // end of class ICommonSvc diff --git a/castor/stager/IGCSvc.hpp b/castor/stager/IGCSvc.hpp index d0fd0dae154f9d7d72b6903557a867f78ff76111..4050c7b7d1c0305c1fa972a2a429e181b25d66f0 100644 --- a/castor/stager/IGCSvc.hpp +++ b/castor/stager/IGCSvc.hpp @@ -68,7 +68,7 @@ namespace castor { */ virtual std::vector<castor::stager::GCLocalFile*>* selectFiles2Delete(std::string diskServer) - throw (castor::exception::Exception) = 0; + = 0; /** * Informs the stager of files effectively deleted. @@ -81,7 +81,7 @@ namespace castor { */ virtual void filesDeleted (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception) = 0; + = 0; /** * Informs the stager of files for which deletion failed. @@ -92,7 +92,7 @@ namespace castor { */ virtual void filesDeletionFailed (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception) = 0; + = 0; /** * Handles a set of files that were deleted from @@ -122,7 +122,7 @@ namespace castor { * The timeout is retrieved from the configuration table in the db */ virtual void removeTerminatedRequests() - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IGCSvc diff --git a/castor/stager/IJobSvc.hpp b/castor/stager/IJobSvc.hpp index 14dbed1674566a871e67bd27dec90f3d426f4591..cd7aacbe6567417862163e2659111e05d7851673 100644 --- a/castor/stager/IJobSvc.hpp +++ b/castor/stager/IJobSvc.hpp @@ -82,7 +82,7 @@ namespace castor { bool* emptyFile, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) = 0; + = 0; /** * Handles the start of a Put job. @@ -100,7 +100,7 @@ namespace castor { std::string mountPoint, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) = 0; + = 0; virtual void prepareForMigration (u_signed64 subReqId, @@ -110,7 +110,7 @@ namespace castor { const std::string nsHost, const std::string csumtype="", const std::string csumvalue="") - throw (castor::exception::Exception) = 0; + = 0; /** * Informs the stager the a Get or Update SubRequest @@ -126,7 +126,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) = 0; + = 0; /** * Informs the stager the a Get or Update SubRequest @@ -141,7 +141,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) = 0; + = 0; /** * Informs the stager the a Put or a PutDone SubRequest failed. @@ -155,7 +155,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) = 0; + = 0; /** * Informs the stager that an update subrequest has written @@ -171,7 +171,7 @@ namespace castor { (u_signed64 subRequestId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IJobSvc diff --git a/castor/stager/IStagerSvc.hpp b/castor/stager/IStagerSvc.hpp index 302b3067065e766b98569fb102546f8bf6bc396f..e0df4386b11055b53607c8a80832f927b6a78db7 100644 --- a/castor/stager/IStagerSvc.hpp +++ b/castor/stager/IStagerSvc.hpp @@ -80,7 +80,7 @@ namespace castor { */ virtual castor::stager::SubRequest* subRequestToDo (const std::string service) - throw (castor::exception::Exception) = 0; + = 0; /** * Selects and processes a bulk request. @@ -90,7 +90,7 @@ namespace castor { */ virtual castor::IObject* processBulkRequest (const std::string service) - throw (castor::exception::Exception) = 0; + = 0; /** * Selects the next SubRequest in FAILED status the stager @@ -101,7 +101,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::SubRequest* subRequestFailedToDo() - throw (castor::exception::Exception) = 0; + = 0; /** * Processes a PToGet and PToUpdate subrequest. @@ -111,7 +111,7 @@ namespace castor { */ virtual int processPrepareRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception) = 0; + = 0; /** * Processes a putDone subrequest. @@ -123,7 +123,7 @@ namespace castor { */ virtual int processPutDoneRequest (castor::stager::SubRequest* subreq) - throw (castor::exception::Exception) = 0; + = 0; /** * Create an internal request to trigger a diskcopy replication. @@ -141,7 +141,7 @@ namespace castor { const castor::stager::SvcClass* srcSc, const castor::stager::SvcClass* destSc, const bool internal = false) - throw (castor::exception::Exception) = 0; + = 0; /** * Retrieves a CastorFile from the database based on its fileId @@ -159,7 +159,7 @@ namespace castor { (castor::stager::SubRequest* subreq, const Cns_fileid* cnsFileId, const Cns_filestatcs* cnsFileStat, const u_signed64 nsOpenTimeInUsec) - throw (castor::exception::Exception) = 0; + = 0; /** * Updates a SubRequest status in the DB, including @@ -181,7 +181,7 @@ namespace castor { */ virtual bool updateAndCheckSubRequest (castor::stager::SubRequest *subreq) - throw (castor::exception::Exception) = 0; + = 0; /** * Archives a SubRequest @@ -193,7 +193,7 @@ namespace castor { */ virtual void archiveSubReq(u_signed64 subReqId, castor::stager::SubRequestStatusCodes finalStatus) - throw (castor::exception::Exception) = 0; + = 0; /** * Implements a single file stageRm. @@ -217,7 +217,7 @@ namespace castor { virtual int stageRm (castor::stager::SubRequest* subreq, const u_signed64 fileId, const std::string nsHost, const u_signed64 svcClassId) - throw (castor::exception::Exception) = 0; + = 0; /* * cleanups the stager DB in case of a stagerRm for a renamed file @@ -225,7 +225,7 @@ namespace castor { */ virtual void renamedFileCleanup (const std::string &fileName, const u_signed64 subReqId) - throw (castor::exception::Exception) = 0; + = 0; /** * Updates the gcWeight of some copies of a given file. @@ -242,7 +242,7 @@ namespace castor { virtual int setFileGCWeight (const u_signed64 fileId, const std::string nsHost, const u_signed64 svcClassId, const float weight) - throw (castor::exception::Exception) = 0; + = 0; /** * Creates an empty (i.e. 0 size) file in the DB. @@ -257,7 +257,7 @@ namespace castor { virtual void createEmptyFile (castor::stager::SubRequest* subreq, bool schedule) - throw (castor::exception::Exception) = 0; + = 0; /** * Triggers the recall of a file @@ -266,7 +266,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::SubRequestStatusCodes createRecallCandidate(u_signed64 srId) - throw (castor::exception::Exception) = 0; + = 0; /** * Gets a configuration option from the @@ -283,14 +283,14 @@ namespace castor { virtual std::string getConfigOption(std::string confClass, std::string confKey, std::string defaultValue) - throw (castor::exception::Exception) = 0; + = 0; /** * Dumps the current logs from the db. * The content is logged in DLF and then deleted. */ virtual void dumpDBLogs() - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IStagerSvc diff --git a/castor/stager/RemoteGCSvc.cpp b/castor/stager/RemoteGCSvc.cpp index 13500672984e9bbe268fb2e80ac3fc1f61624540..847d89a2cebb7bc241b22313a4ab6214a74c47d4 100644 --- a/castor/stager/RemoteGCSvc.cpp +++ b/castor/stager/RemoteGCSvc.cpp @@ -105,7 +105,7 @@ unsigned int castor::stager::RemoteGCSvc::ID() { //------------------------------------------------------------------------------ castor::stager::Request* castor::stager::RemoteGCSvc::requestToDo(std::string) - throw (castor::exception::Exception) { + { castor::exception::NotSupported ex; ex.getMessage() << "RemoteGCSvc implementation is not complete" @@ -150,7 +150,7 @@ public: m_result(result) {} virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) { + { if (0 != r.errorCode()) { castor::exception::Exception e(r.errorCode()); e.getMessage() << r.errorMessage(); @@ -176,7 +176,7 @@ public: resp->files().clear(); }; virtual void terminate() - throw (castor::exception::Exception) {}; + {}; private: // where to store the diskCopy std::vector<castor::stager::GCLocalFile*>* m_result; @@ -188,7 +188,7 @@ private: std::vector<castor::stager::GCLocalFile*>* castor::stager::RemoteGCSvc::selectFiles2Delete (std::string diskServer) - throw (castor::exception::Exception) { + { // Build the Files2DeleteRequest castor::stager::Files2Delete req; req.setDiskServer(diskServer); @@ -209,7 +209,7 @@ castor::stager::RemoteGCSvc::selectFiles2Delete //------------------------------------------------------------------------------ void castor::stager::RemoteGCSvc::filesDeleted (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception) { + { // Build the FilesDeletedRequest castor::stager::FilesDeleted req; for (std::vector<u_signed64*>::iterator it = diskCopyIds.begin(); @@ -237,7 +237,7 @@ void castor::stager::RemoteGCSvc::filesDeleted //------------------------------------------------------------------------------ void castor::stager::RemoteGCSvc::filesDeletionFailed (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception) { + { // Build the FilesDeletionFailedRequest castor::stager::FilesDeletionFailed req; for (std::vector<u_signed64*>::iterator it = diskCopyIds.begin(); @@ -274,7 +274,7 @@ public: m_result(result) {} virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) { + { if (0 != r.errorCode()) { castor::exception::Exception e(r.errorCode()); e.getMessage() << r.errorMessage(); @@ -299,7 +299,7 @@ public: resp->orphanFileIds().clear(); }; virtual void terminate() - throw (castor::exception::Exception) {}; + {}; private: // where to store the list of files not found std::vector<u_signed64>* m_result; @@ -358,7 +358,7 @@ public: m_result(result) {} virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) { + { if (0 != r.errorCode()) { castor::exception::Exception e(r.errorCode()); e.getMessage() << r.errorMessage(); @@ -383,7 +383,7 @@ public: resp->orphanFileIds().clear(); }; virtual void terminate() - throw (castor::exception::Exception) {}; + {}; private: // where to store the list of files not found std::vector<u_signed64>* m_result; @@ -432,7 +432,7 @@ std::vector<u_signed64> castor::stager::RemoteGCSvc::stgFilesDeleted // dumpCleanupLogs // ----------------------------------------------------------------------- void castor::stager::RemoteGCSvc::dumpCleanupLogs() - throw (castor::exception::Exception) { + { castor::exception::NotSupported ex; ex.getMessage() << "RemoteGCSvc implementation is not complete" @@ -444,7 +444,7 @@ void castor::stager::RemoteGCSvc::dumpCleanupLogs() // removeTerminatedRequests // ----------------------------------------------------------------------- void castor::stager::RemoteGCSvc::removeTerminatedRequests() - throw (castor::exception::Exception) { + { castor::exception::NotSupported ex; ex.getMessage() << "RemoteGCSvc implementation is not complete" diff --git a/castor/stager/RemoteGCSvc.hpp b/castor/stager/RemoteGCSvc.hpp index 4be1e116819700440cbbb9dce6061b367e40bfe2..2b7fa715dd1182bf33c10803bc22263641885a1d 100644 --- a/castor/stager/RemoteGCSvc.hpp +++ b/castor/stager/RemoteGCSvc.hpp @@ -86,7 +86,7 @@ namespace castor { */ virtual std::vector<castor::stager::GCLocalFile*>* selectFiles2Delete(std::string diskServer) - throw (castor::exception::Exception); + ; /** * Informs the stager of files effectively deleted. @@ -99,7 +99,7 @@ namespace castor { */ virtual void filesDeleted (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception); + ; /** * Informs the stager of files for which deletion failed. @@ -110,7 +110,7 @@ namespace castor { */ virtual void filesDeletionFailed (std::vector<u_signed64*>& diskCopyIds) - throw (castor::exception::Exception); + ; /** * Handles a set of files that were deleted from @@ -140,14 +140,14 @@ namespace castor { * The content is logged in DLF and then deleted. */ virtual void dumpCleanupLogs() - throw (castor::exception::Exception); + ; /** * Removes requests older than a given timeout, taken * from the configuration table in the db */ virtual void removeTerminatedRequests() - throw (castor::exception::Exception); + ; /////// ICommonSvc part (not implemented) @@ -160,7 +160,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::Request* requestToDo(std::string service) - throw (castor::exception::Exception); + ; protected: diff --git a/castor/stager/RemoteJobSvc.cpp b/castor/stager/RemoteJobSvc.cpp index e02746df090f48b7bd0fcf9d40b22e57b229e7f6..918b0b9bef6aa727fb0c4a0b354357f442aee6f2 100644 --- a/castor/stager/RemoteJobSvc.cpp +++ b/castor/stager/RemoteJobSvc.cpp @@ -102,7 +102,7 @@ unsigned int castor::stager::RemoteJobSvc::ID() { //------------------------------------------------------------------------------ castor::stager::Request* castor::stager::RemoteJobSvc::requestToDo(std::string) - throw (castor::exception::Exception) { + { castor::exception::NotSupported ex; ex.getMessage() << "RemoteJobSvc implementation is not complete" @@ -127,7 +127,7 @@ public: m_emptyFile(emptyFile){} virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) { + { castor::rh::GetUpdateStartResponse *resp = dynamic_cast<castor::rh::GetUpdateStartResponse*>(&r); if (0 != resp->errorCode()) { @@ -139,7 +139,7 @@ public: *m_emptyFile = resp->emptyFile(); }; virtual void terminate() - throw (castor::exception::Exception) {}; + {}; private: // Where to store the diskCopy std::string* m_diskCopyPath; @@ -158,7 +158,7 @@ castor::stager::RemoteJobSvc::getUpdateStart bool* emptyFile, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) { + { // placeholders for the result std::string result; // Build a response Handler @@ -193,7 +193,7 @@ public: m_diskCopyPath(diskCopyPath) {} virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) { + { if (0 != r.errorCode()) { castor::exception::Exception e(r.errorCode()); e.getMessage() << r.errorMessage(); @@ -211,7 +211,7 @@ public: *m_diskCopyPath = resp->diskCopyPath(); }; virtual void terminate() - throw (castor::exception::Exception) {}; + {}; private: // Where to store the diskCopyPath std::string* m_diskCopyPath; @@ -227,7 +227,7 @@ castor::stager::RemoteJobSvc::putStart std::string mountPoint, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) { + { // placeholders for the result std::string result; // Build a response Handler @@ -259,7 +259,7 @@ void castor::stager::RemoteJobSvc::prepareForMigration const std::string nsHost, const std::string csumtype, const std::string csumvalue) - throw (castor::exception::Exception) { + { // Build the MoverCloseRequest castor::stager::MoverCloseRequest req; req.setSubReqId(subReqId); @@ -306,7 +306,7 @@ void castor::stager::RemoteJobSvc::getUpdateDone (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) { + { // Build the GetUpdateDoneRequest castor::stager::GetUpdateDone req; req.setSubReqId(subReqId); @@ -327,7 +327,7 @@ void castor::stager::RemoteJobSvc::getUpdateFailed (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) { + { // Build the GetUpdateFailedRequest castor::stager::GetUpdateFailed req; req.setSubReqId(subReqId); @@ -348,7 +348,7 @@ void castor::stager::RemoteJobSvc::putFailed (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) { + { // Build the PutFailedRequest castor::stager::PutFailed req; req.setSubReqId(subReqId); @@ -369,7 +369,7 @@ void castor::stager::RemoteJobSvc::firstByteWritten (u_signed64 subRequestId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception) { + { // Build the FirstByteWrittenRequest castor::stager::FirstByteWritten req; req.setSubReqId(subRequestId); diff --git a/castor/stager/RemoteJobSvc.hpp b/castor/stager/RemoteJobSvc.hpp index ec1bcc38e5cff792d4802fb5340777be186fcee6..05557a2988b384fc37e38f5c326442f703e1f014 100644 --- a/castor/stager/RemoteJobSvc.hpp +++ b/castor/stager/RemoteJobSvc.hpp @@ -93,7 +93,7 @@ namespace castor { bool* emptyFile, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Handles the start of a Put job. @@ -111,7 +111,7 @@ namespace castor { std::string mountPoint, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Prepares a file for migration, when needed. @@ -142,7 +142,7 @@ namespace castor { const std::string nsHost, const std::string csumtype="", const std::string csumvalue="") - throw (castor::exception::Exception); + ; /** * Informs the stager the a Get or Update SubRequest @@ -158,7 +158,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Informs the stager the a Get or Update SubRequest @@ -173,7 +173,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /** * Informs the stager the a Put and PutDone SubRequest failed. @@ -187,7 +187,7 @@ namespace castor { (u_signed64 subReqId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; /////// ICommonSvc part (not implemented) @@ -200,7 +200,7 @@ namespace castor { * @exception Exception in case of error */ virtual castor::stager::Request* requestToDo(std::string service) - throw (castor::exception::Exception); + ; /** * Informs the stager that an update subrequest has written @@ -216,7 +216,7 @@ namespace castor { (u_signed64 subRequestId, u_signed64 fileId, const std::string nsHost) - throw (castor::exception::Exception); + ; protected: diff --git a/castor/stager/daemon/BulkStageReqSvcThread.cpp b/castor/stager/daemon/BulkStageReqSvcThread.cpp index d2b2e202e878f55680bf1098e5f7e3b26c28fc48..ed9f5bf1e7bfa66f0d0e705c1bd24a96c84c4775 100644 --- a/castor/stager/daemon/BulkStageReqSvcThread.cpp +++ b/castor/stager/daemon/BulkStageReqSvcThread.cpp @@ -50,7 +50,7 @@ //----------------------------------------------------------------------------- // constructor //----------------------------------------------------------------------------- -castor::stager::daemon::BulkStageReqSvcThread::BulkStageReqSvcThread() throw () : +castor::stager::daemon::BulkStageReqSvcThread::BulkStageReqSvcThread() throw() : castor::server::SelectProcessThread() {} //----------------------------------------------------------------------------- diff --git a/castor/stager/daemon/ErrorSvcThread.cpp b/castor/stager/daemon/ErrorSvcThread.cpp index 4ce3f3aed5436467973ffcd17cb45819b1fc746b..63858598e5048a49b8b53aaf1b8bd177861949b1 100644 --- a/castor/stager/daemon/ErrorSvcThread.cpp +++ b/castor/stager/daemon/ErrorSvcThread.cpp @@ -47,7 +47,7 @@ //----------------------------------------------------------------------------- // constructor //----------------------------------------------------------------------------- -castor::stager::daemon::ErrorSvcThread::ErrorSvcThread() throw () {} +castor::stager::daemon::ErrorSvcThread::ErrorSvcThread() throw() {} //----------------------------------------------------------------------------- // select diff --git a/castor/stager/daemon/GcSvcThread.cpp b/castor/stager/daemon/GcSvcThread.cpp index c65edbf0b0b97f904fccc31b56105a4b0ee8d32e..0f7efb957af9f91039c63868140d2d8343ec3828 100644 --- a/castor/stager/daemon/GcSvcThread.cpp +++ b/castor/stager/daemon/GcSvcThread.cpp @@ -51,7 +51,7 @@ //----------------------------------------------------------------------------- // constructor //----------------------------------------------------------------------------- -castor::stager::daemon::GcSvcThread::GcSvcThread() throw () : +castor::stager::daemon::GcSvcThread::GcSvcThread() throw() : BaseRequestSvcThread("GCSvc", "DbGCSvc", castor::SVC_DBGCSVC) {} diff --git a/castor/stager/daemon/JobRequestSvcThread.cpp b/castor/stager/daemon/JobRequestSvcThread.cpp index 5729d4b4c60106a7c16a4e73df737569bf17a6a5..62b40b8ba3171a58fb4e05c4dd7d90e4bfa38f7a 100644 --- a/castor/stager/daemon/JobRequestSvcThread.cpp +++ b/castor/stager/daemon/JobRequestSvcThread.cpp @@ -39,7 +39,7 @@ // constructor //----------------------------------------------------------------------------- castor::stager::daemon::JobRequestSvcThread::JobRequestSvcThread() - throw (castor::exception::Exception) : SelectProcessThread() {} + : SelectProcessThread() {} //----------------------------------------------------------------------------- // select @@ -65,7 +65,7 @@ castor::IObject* castor::stager::daemon::JobRequestSvcThread::select() throw() { //----------------------------------------------------------------------------- castor::stager::daemon::JobRequest* castor::stager::daemon::JobRequestSvcThread::jobSubRequestToDo() - throw(castor::exception::Exception) { + { // get the DbCnvSvc for handling ORACLE statements castor::IService *svc = castor::BaseObject::services()->service("DbCnvSvc", castor::SVC_DBCNV); castor::db::ora::OraCnvSvc *dbSvc = dynamic_cast<castor::db::ora::OraCnvSvc*>(svc); @@ -150,7 +150,7 @@ castor::stager::daemon::JobRequestSvcThread::jobSubRequestToDo() //----------------------------------------------------------------------------- // process //----------------------------------------------------------------------------- -void castor::stager::daemon::JobRequestSvcThread::process(castor::IObject* requestToProcess) throw () { +void castor::stager::daemon::JobRequestSvcThread::process(castor::IObject* requestToProcess) throw() { struct Cns_fileid cnsFileid; memset(&cnsFileid, 0, sizeof(cnsFileid)); // for monitoring purposes @@ -215,7 +215,7 @@ int castor::stager::daemon::JobRequestSvcThread::handleGetOrPut(const JobRequest struct Cns_fileid &cnsFileid, u_signed64 fileSize, u_signed64 stagerOpentimeInUsec) - throw (castor::exception::Exception) { + { // get the DbCnvSvc for handling ORACLE statements castor::IService *svc = castor::BaseObject::services()->service("DbCnvSvc", castor::SVC_DBCNV); castor::db::ora::OraCnvSvc *dbSvc = dynamic_cast<castor::db::ora::OraCnvSvc*>(svc); @@ -263,7 +263,7 @@ int castor::stager::daemon::JobRequestSvcThread::handleGetOrPut(const JobRequest //----------------------------------------------------------------------------- bool castor::stager::daemon::JobRequestSvcThread::updateAndCheckSubRequest (const u_signed64 srId, const int status) - throw (castor::exception::Exception) { + { // get the DbCnvSvc for handling ORACLE statements castor::IService *svc = castor::BaseObject::services()->service("DbCnvSvc", castor::SVC_DBCNV); castor::db::ora::OraCnvSvc *dbSvc = dynamic_cast<castor::db::ora::OraCnvSvc*>(svc); @@ -297,7 +297,7 @@ void castor::stager::daemon::JobRequestSvcThread::answerClient(const JobRequest int errorCode, const std::string &errorMsg, bool isLastAnswer) - throw (castor::exception::Exception) { + { /* create client object */ castor::rh::Client cl; cl.setIpAddress(sr->clientIpAddress); diff --git a/castor/stager/daemon/JobRequestSvcThread.hpp b/castor/stager/daemon/JobRequestSvcThread.hpp index 0f4b389ddc131eedb26b9ca17d028417eba7eef3..cc2a0437e6c9378dc330df1494497cba3c1fa5d9 100644 --- a/castor/stager/daemon/JobRequestSvcThread.hpp +++ b/castor/stager/daemon/JobRequestSvcThread.hpp @@ -83,7 +83,7 @@ namespace castor { public: /** constructor */ - JobRequestSvcThread() throw (castor::exception::Exception); + JobRequestSvcThread() ; /** virtual destructor */ virtual ~JobRequestSvcThread() throw() {}; @@ -103,7 +103,7 @@ namespace castor { private: /** helper function calling the PL/SQL method jobSubRequestToDo */ - JobRequest *jobSubRequestToDo() throw (castor::exception::Exception); + JobRequest *jobSubRequestToDo() ; /** helper function calling the PL/SQL method handleGetOrPut * returns whether we should reply to client. Possible values are @@ -113,19 +113,19 @@ namespace castor { */ int handleGetOrPut(const JobRequest *sr, struct Cns_fileid &cnsFileid, u_signed64 fileSize, u_signed64 stagerOpentimeInUsec) - throw (castor::exception::Exception); + ; /** helper function calling the PL/SQL method updateAndCheckSubRequest * returns whether we are the last subrequest of the corresponding resquest */ bool updateAndCheckSubRequest(const u_signed64 srId, const int status) - throw (castor::exception::Exception); + ; /** helper function answering the client */ void answerClient(const JobRequest *sr, u_signed64 cnsFileid, int status, int errorCode, const std::string &errorMsg, bool isLastAnswer = false) - throw (castor::exception::Exception); + ; }; diff --git a/castor/stager/daemon/JobSvcThread.cpp b/castor/stager/daemon/JobSvcThread.cpp index 93d7f8ae10d033c6467b5b84b93eacd6e2d6408a..89ba5d1ba26d850a7aeae8d02b2dbb89af98021c 100644 --- a/castor/stager/daemon/JobSvcThread.cpp +++ b/castor/stager/daemon/JobSvcThread.cpp @@ -58,7 +58,7 @@ //----------------------------------------------------------------------------- // constructor //----------------------------------------------------------------------------- -castor::stager::daemon::JobSvcThread::JobSvcThread() throw () : +castor::stager::daemon::JobSvcThread::JobSvcThread() throw() : BaseRequestSvcThread("JobSvc", "DbJobSvc", castor::SVC_DBJOBSVC) {} diff --git a/castor/stager/daemon/NsOverride.cpp b/castor/stager/daemon/NsOverride.cpp index 5c36907ffb3cee42736e4907cebedea94acdff5d..001c354345a45453c80770154d5c51c39accdf3a 100644 --- a/castor/stager/daemon/NsOverride.cpp +++ b/castor/stager/daemon/NsOverride.cpp @@ -38,7 +38,7 @@ castor::stager::daemon::NsOverride* castor::stager::daemon::NsOverride::s_instan // getInstance //------------------------------------------------------------------------------ castor::stager::daemon::NsOverride* castor::stager::daemon::NsOverride::getInstance() - throw () { + throw() { // make the instantiation of the singleton thread-safe, // even though this class is supposed to be instantiated before spawning threads if (0 == s_instance) { @@ -54,7 +54,7 @@ castor::stager::daemon::NsOverride* castor::stager::daemon::NsOverride::getInsta //----------------------------------------------------------------------------- // constructor //----------------------------------------------------------------------------- -castor::stager::daemon::NsOverride::NsOverride() throw () { +castor::stager::daemon::NsOverride::NsOverride() throw() { char* cnsHost = getconfent("CNS", "HOST", 0); if (cnsHost == 0 || *cnsHost == 0) { // no override in place diff --git a/castor/stager/daemon/NsOverride.hpp b/castor/stager/daemon/NsOverride.hpp index 1848fd57079ab953cd5c11f9964130d739f820f0..bd4bccff7ac06a2a93684e0ca92fd048fd7ae531 100644 --- a/castor/stager/daemon/NsOverride.hpp +++ b/castor/stager/daemon/NsOverride.hpp @@ -39,7 +39,7 @@ namespace castor { public: static castor::stager::daemon::NsOverride* getInstance() - throw (); + throw(); std::string getCnsHost() { return m_cnsHost; @@ -57,7 +57,7 @@ namespace castor { /** * Default costructor */ - NsOverride() throw (); + NsOverride() throw(); /** * Default destructor diff --git a/castor/stager/daemon/PutDoneHandler.cpp b/castor/stager/daemon/PutDoneHandler.cpp index c0e7a80dda205304ba136d38fe43f85edaae383b..48aebd5b616a2dad7d6fe27e8acd72969c92074e 100644 --- a/castor/stager/daemon/PutDoneHandler.cpp +++ b/castor/stager/daemon/PutDoneHandler.cpp @@ -34,7 +34,7 @@ namespace castor{ namespace stager{ namespace daemon{ - void PutDoneHandler::handle() throw(castor::exception::Exception) + void PutDoneHandler::handle() { RequestHandler::handle(); diff --git a/castor/stager/daemon/PutDoneHandler.hpp b/castor/stager/daemon/PutDoneHandler.hpp index b62d49ef44cf6449e442da580d842b8730bb7e32..342b4da4e029f9ec601c175ba55c25a6eb10eb76 100644 --- a/castor/stager/daemon/PutDoneHandler.hpp +++ b/castor/stager/daemon/PutDoneHandler.hpp @@ -30,13 +30,13 @@ namespace castor{ public: /* constructor */ - PutDoneHandler(RequestHelper* reqHelper) throw(castor::exception::Exception) : + PutDoneHandler(RequestHelper* reqHelper) : RequestHandler(reqHelper) {}; /* destructor */ ~PutDoneHandler() throw() {}; /* putDone request handler */ - virtual void handle() throw(castor::exception::Exception); + virtual void handle() ; }; //end PutDoneHandler class diff --git a/castor/stager/daemon/QueryRequestSvcThread.cpp b/castor/stager/daemon/QueryRequestSvcThread.cpp index f64509fa64d5ffbe63d0a9325134916488daf621..bfcfc5041185da3f6d9e15637e37136abeb75317 100644 --- a/castor/stager/daemon/QueryRequestSvcThread.cpp +++ b/castor/stager/daemon/QueryRequestSvcThread.cpp @@ -75,7 +75,7 @@ // constructor //----------------------------------------------------------------------------- castor::stager::daemon::QueryRequestSvcThread::QueryRequestSvcThread() - throw () : + throw() : BaseRequestSvcThread("QueryReqSvc", "DbQuerySvc", castor::SVC_DBQUERYSVC) {} //----------------------------------------------------------------------------- @@ -167,7 +167,7 @@ castor::stager::daemon::QueryRequestSvcThread::handleFileQueryRequestByFileName castor::stager::StageFileQueryRequest& req, Cuuid_t uuid, bool all) - throw (castor::exception::Exception) { + { // "Processing File Query by Filename" castor::dlf::Param params[] = {castor::dlf::Param("Filename", fileName)}; @@ -280,7 +280,7 @@ castor::stager::daemon::QueryRequestSvcThread::handleFileQueryRequestByFileId castor::stager::StageFileQueryRequest& req, Cuuid_t uuid, bool all) - throw (castor::exception::Exception) { + { // Processing File Query by fileid castor::dlf::dlf_writep(uuid, DLF_LVL_SYSTEM, STAGER_QRYSVC_IQUERY, fid, nshost); std::list<castor::stager::StageQueryResult*>* result = @@ -359,7 +359,7 @@ castor::stager::daemon::QueryRequestSvcThread::handleFileQueryRequestByRequest u_signed64 svcClassId, castor::stager::StageFileQueryRequest& req, Cuuid_t uuid) - throw (castor::exception::Exception) { + { // Processing File Query by Request castor::dlf::Param params[] = {castor::dlf::Param("ReqId", val), @@ -441,7 +441,7 @@ castor::stager::daemon::QueryRequestSvcThread::handleFileQueryRequest castor::IClient *client, castor::query::IQuerySvc* qrySvc, Cuuid_t uuid) - throw (castor::exception::Exception) { + { // Useful Variables castor::stager::StageFileQueryRequest *uReq; // get the StageFileQueryRequest @@ -626,7 +626,7 @@ void castor::stager::daemon::QueryRequestSvcThread::handleDiskPoolQuery castor::IClient *client, castor::query::IQuerySvc* qrySvc, Cuuid_t uuid) - throw (castor::exception::Exception) { + { castor::query::DiskPoolQuery *uReq; try { // Get the StageFileQueryRequest @@ -744,7 +744,7 @@ void castor::stager::daemon::QueryRequestSvcThread::handleChangePrivilege castor::IClient *client, castor::rh::IRHSvc* rhSvc, Cuuid_t uuid) - throw (castor::exception::Exception) { + { // Get the ChangePrivilege // cannot return 0 since we check the type before calling this method castor::bwlist::ChangePrivilege *uReq = @@ -843,7 +843,7 @@ void castor::stager::daemon::QueryRequestSvcThread::handleListPrivileges castor::IClient *client, castor::rh::IRHSvc* rhSvc, Cuuid_t uuid) - throw (castor::exception::Exception) { + { castor::bwlist::ListPrivileges *uReq; castor::bwlist::ListPrivilegesResponse res; try { @@ -893,7 +893,7 @@ void castor::stager::daemon::QueryRequestSvcThread::handleListPrivileges //----------------------------------------------------------------------------- void castor::stager::daemon::QueryRequestSvcThread::handleVersionQuery (castor::stager::Request*, castor::IClient *client, Cuuid_t uuid) - throw (castor::exception::Exception) { + { // "Processing VersionQuery" castor::dlf::dlf_writep(uuid, DLF_LVL_SYSTEM, STAGER_QRYSVC_VQUERY); castor::query::VersionResponse result; diff --git a/castor/stager/daemon/QueryRequestSvcThread.hpp b/castor/stager/daemon/QueryRequestSvcThread.hpp index f78b03eb6dad108ee07cfb262e6cb094e1bb62df..cb71b32e79769ccfa9d389d8c3e2ad5b1effe814 100644 --- a/castor/stager/daemon/QueryRequestSvcThread.hpp +++ b/castor/stager/daemon/QueryRequestSvcThread.hpp @@ -89,7 +89,7 @@ namespace castor { castor::stager::StageFileQueryRequest& req, Cuuid_t uuid, bool all) - throw (castor::exception::Exception); + ; /** * Handles a filequery by fileId and replies to client. @@ -103,7 +103,7 @@ namespace castor { castor::stager::StageFileQueryRequest& req, Cuuid_t uuid, bool all) - throw (castor::exception::Exception); + ; /** * Handles a filequery by reqId/userTag or getLastRecalls version and replies to client. @@ -115,7 +115,7 @@ namespace castor { u_signed64 svcClassId, castor::stager::StageFileQueryRequest& req, Cuuid_t uuid) - throw (castor::exception::Exception); + ; /** * Handles a fileQueryRequest and replies to client. @@ -128,7 +128,7 @@ namespace castor { castor::IClient *client, castor::query::IQuerySvc* qrySvc, Cuuid_t uuid) - throw (castor::exception::Exception); + ; /** * Handles a DiskPoolQuery and replies to client. @@ -141,7 +141,7 @@ namespace castor { castor::IClient *client, castor::query::IQuerySvc* qrySvc, Cuuid_t uuid) - throw (castor::exception::Exception); + ; /** * Handles a ChangePrivilege Request and replies to client. @@ -154,7 +154,7 @@ namespace castor { castor::IClient *client, castor::rh::IRHSvc* rhSvc, Cuuid_t uuid) - throw (castor::exception::Exception); + ; /** * Handles a ListPrivilege Request and replies to client. @@ -167,7 +167,7 @@ namespace castor { castor::IClient *client, castor::rh::IRHSvc* rhSvc, Cuuid_t uuid) - throw (castor::exception::Exception); + ; /** * Handles a VersionQuery and replies to client. @@ -178,7 +178,7 @@ namespace castor { void handleVersionQuery(castor::stager::Request* req, castor::IClient *client, Cuuid_t uuid) - throw (castor::exception::Exception); + ; /** * helper method for cleaning up a request and releasing diff --git a/castor/stager/daemon/ReplyHelper.cpp b/castor/stager/daemon/ReplyHelper.cpp index 9959dfb33af7ea38f607c62142e44272ffb3987a..51875e4696ee72c39fef745b22e5b41350226faf 100644 --- a/castor/stager/daemon/ReplyHelper.cpp +++ b/castor/stager/daemon/ReplyHelper.cpp @@ -34,7 +34,7 @@ namespace castor{ namespace daemon{ - ReplyHelper::ReplyHelper() throw(castor::exception::Exception) + ReplyHelper::ReplyHelper() { try{ this->ioResponse = new castor::rh::IOResponse; @@ -65,7 +65,7 @@ namespace castor{ int errorCode, std::string errorMessage, const castor::stager::DiskCopyInfo* diskCopy) - throw(castor::exception::Exception) + { if(!reqHelper->fileRequest) { castor::exception::Exception e; @@ -106,7 +106,7 @@ namespace castor{ /*********************************************************************************************/ /* check if there is any subrequest left and send the endResponse to client if it is needed */ /*******************************************************************************************/ - void ReplyHelper::endReplyToClient(RequestHelper* reqHelper) throw(castor::exception::Exception){ + void ReplyHelper::endReplyToClient(RequestHelper* reqHelper) { /* to update the subrequest on DB */ bool requestLeft = reqHelper->stagerService->updateAndCheckSubRequest(reqHelper->subrequest); if(!requestLeft && reqHelper->fileRequest != 0) { diff --git a/castor/stager/daemon/ReplyHelper.hpp b/castor/stager/daemon/ReplyHelper.hpp index f5de0f39db50e579d4565e806075080f675bede2..c2ff913dc9151aefbda01e79fbe39c80123c7edf 100644 --- a/castor/stager/daemon/ReplyHelper.hpp +++ b/castor/stager/daemon/ReplyHelper.hpp @@ -47,7 +47,7 @@ namespace castor{ /** * constructor */ - ReplyHelper() throw(castor::exception::Exception); + ReplyHelper() ; /** * destructor @@ -76,13 +76,13 @@ namespace castor{ int errorCode, std::string errorMessage, const castor::stager::DiskCopyInfo* diskCopy = 0) - throw(castor::exception::Exception); + ; /*********************************************************************************************/ /* check if there is any subrequest left and send the endResponse to client if it is needed */ /*******************************************************************************************/ - void endReplyToClient(RequestHelper* reqHelper) throw(castor::exception::Exception); + void endReplyToClient(RequestHelper* reqHelper) ; }; // end ReplyHelper diff --git a/castor/stager/daemon/RequestHandler.cpp b/castor/stager/daemon/RequestHandler.cpp index 5f1fb50140a6f4aab60c70f3bcd3c60090bcd0d8..ecc7e1cea656e108b37992c7ae002612852aadfa 100644 --- a/castor/stager/daemon/RequestHandler.cpp +++ b/castor/stager/daemon/RequestHandler.cpp @@ -11,7 +11,7 @@ namespace castor{ namespace daemon{ /* function to perform the common flow for all the handlers */ - void RequestHandler::handle() throw(castor::exception::Exception) + void RequestHandler::handle() { // get the svcClass and eventually the forced fileClass reqHelper->resolveSvcClass(); diff --git a/castor/stager/daemon/RequestHandler.hpp b/castor/stager/daemon/RequestHandler.hpp index 176e9d9e5e8f305fa4519b4b5752b7f5fb8c05e0..eefef418e979082139f2f9e995599645ed6ec784 100644 --- a/castor/stager/daemon/RequestHandler.hpp +++ b/castor/stager/daemon/RequestHandler.hpp @@ -31,7 +31,7 @@ namespace castor{ * Default behavior is the common part across all user requests processing. * @throw exception in case of system/db errors. */ - virtual void handle() throw (castor::exception::Exception); + virtual void handle() ; /// The RequestHelper instance RequestHelper* reqHelper; diff --git a/castor/stager/daemon/RequestHelper.cpp b/castor/stager/daemon/RequestHelper.cpp index 8074098c2129f884f5c51a3e5bcd8c52795be264..ce2ce4237a834604ed470148c85939eac9c30960 100644 --- a/castor/stager/daemon/RequestHelper.cpp +++ b/castor/stager/daemon/RequestHelper.cpp @@ -44,7 +44,7 @@ namespace castor { /* constructor, returns the request type */ RequestHelper::RequestHelper(castor::stager::SubRequest* subRequestToProcess, int &typeRequest) - throw(castor::exception::Exception) : + : stagerService(0), dbSvc(0), baseAddr(0), subrequest(subRequestToProcess), fileRequest(0), svcClass(0), castorFile(0), euid(0), egid(0) { @@ -141,7 +141,7 @@ namespace castor { castor::dlf::dlf_writep(requestUuid, level, messageNb, 6, params, fid); } - void RequestHelper::resolveSvcClass() throw(castor::exception::Exception) { + void RequestHelper::resolveSvcClass() { // XXX we're still using fillObj here, a single db method // XXX (better piggybacking on existing calls) should be implemented dbSvc->fillObj(baseAddr, fileRequest, castor::OBJ_SvcClass, false); @@ -158,7 +158,7 @@ namespace castor { /* Gets the CastorFile from the db */ - void RequestHelper::getCastorFile() throw(castor::exception::Exception) + void RequestHelper::getCastorFile() { try{ // get the castorFile from the stagerService and fill it on the subrequest @@ -174,12 +174,12 @@ namespace castor { castor::exception::Exception ex(e.code()); ex.getMessage() << "Impossible to perform the request: " << e.getMessage().str(); - throw(ex); + throw ex; } } /* Stats the file in the NameServer, throws exception in case of error, except ENOENT */ - void RequestHelper::statNameServerFile() throw(castor::exception::Exception) { + void RequestHelper::statNameServerFile() { // Check the existence of the file. Don't throw exception if ENOENT Cns_setid(fileRequest->euid(), fileRequest->egid()); serrno = 0; @@ -205,7 +205,7 @@ namespace castor { const int modebits, const int flags, struct Cns_fileid &cnsFileid, u_signed64 &fileClass, u_signed64 &fileSize, u_signed64 &stagerOpenTimeInUsec) - throw(castor::exception::Exception) { + { // check if the filename is valid (it has to start with /) if (fileName.empty() || fileName.at(0) != '/') { castor::exception::Exception ex(EINVAL); diff --git a/castor/stager/daemon/RequestHelper.hpp b/castor/stager/daemon/RequestHelper.hpp index 494733c21e829c2e24064600a8cf48349f8aa2b7..ac99ea925fe576621d62c65ac151184c43c41498 100644 --- a/castor/stager/daemon/RequestHelper.hpp +++ b/castor/stager/daemon/RequestHelper.hpp @@ -100,7 +100,7 @@ namespace castor { timeval tvStart; RequestHelper(castor::stager::SubRequest* subRequestToProcess, int &typeRequest) - throw(castor::exception::Exception); + ; ~RequestHelper() throw(); @@ -108,7 +108,7 @@ namespace castor { * Resolves the svcClass if not resolved yet * @throw exception in case of any database error */ - void resolveSvcClass() throw(castor::exception::Exception); + void resolveSvcClass() ; /** * Checks the existence of the requested file in the NameServer, and creates it if the request allows for @@ -121,20 +121,20 @@ namespace castor { const int modebits, const int flags, struct Cns_fileid &cnsFileid, u_signed64 &fileClass, u_signed64 &fileSize, u_signed64 &stagerOpenTimeInUsec) - throw(castor::exception::Exception); + ; /** * Stats the requested file in the NameServer. * @throw exception in case of any NS error except ENOENT. serrno is set accordingly. */ void statNameServerFile() - throw(castor::exception::Exception); + ; /** * Gets the castorFile from the db, calling selectCastorFile * @throw exception in case of any database error */ - void getCastorFile() throw(castor::exception::Exception); + void getCastorFile() ; /** * Logs a standard message to DLF including all needed info (e.g. filename, svcClass, etc.) diff --git a/castor/stager/daemon/RmHandler.cpp b/castor/stager/daemon/RmHandler.cpp index 09e68de71c011619e52d9b48d39f740efac9fea0..537c5ffbee4b3c64b2a3455334e0e7a7eace2b6f 100644 --- a/castor/stager/daemon/RmHandler.cpp +++ b/castor/stager/daemon/RmHandler.cpp @@ -27,7 +27,7 @@ namespace castor{ namespace daemon{ - void RmHandler::handle() throw(castor::exception::Exception) + void RmHandler::handle() { // stat the file in the nameserver reqHelper->statNameServerFile(); @@ -90,7 +90,7 @@ namespace castor{ castor::dlf::Param("Error Code",sstrerror(e.code())), castor::dlf::Param("Error Message",e.getMessage().str())}; castor::dlf::dlf_writep(reqHelper->requestUuid, DLF_LVL_ERROR, STAGER_RM, 2, params, &(reqHelper->cnsFileid)); - throw(e); + throw e; } } diff --git a/castor/stager/daemon/RmHandler.hpp b/castor/stager/daemon/RmHandler.hpp index 21bafd4b0f3249c9c5d41e296f521e2822975b7f..c5f3c5f422a1deafedae3f420232479194eb651a 100644 --- a/castor/stager/daemon/RmHandler.hpp +++ b/castor/stager/daemon/RmHandler.hpp @@ -36,13 +36,13 @@ namespace castor{ public: /* constructor */ - RmHandler(RequestHelper* reqHelper) throw () : + RmHandler(RequestHelper* reqHelper) throw() : RequestHandler(reqHelper) {}; /* destructor */ ~RmHandler() throw() {}; /* rm subrequest handler */ - virtual void handle() throw(castor::exception::Exception); + virtual void handle() ; }; // end RmHandler class diff --git a/castor/stager/daemon/SetGCWeightHandler.cpp b/castor/stager/daemon/SetGCWeightHandler.cpp index 50e90f3c4ffde4efea8542886283391eccb3f6a9..e86a09358e609ab4d5bf1f357675e1f9aa19cd72 100644 --- a/castor/stager/daemon/SetGCWeightHandler.cpp +++ b/castor/stager/daemon/SetGCWeightHandler.cpp @@ -31,7 +31,7 @@ namespace castor{ namespace stager{ namespace daemon{ - void SetGCWeightHandler::handle() throw(castor::exception::Exception) + void SetGCWeightHandler::handle() { RequestHandler::handle(); @@ -108,7 +108,7 @@ namespace castor{ }; castor::dlf::dlf_writep(reqHelper->requestUuid, DLF_LVL_ERROR, STAGER_SETGC, 2 ,params, &(reqHelper->cnsFileid)); - throw(e); + throw e; } } diff --git a/castor/stager/daemon/SetGCWeightHandler.hpp b/castor/stager/daemon/SetGCWeightHandler.hpp index 61469a286e88567ae838b04371f2da87a723bba3..63434699f6fa570c9ebf466b3d7c08fdbde74fc6 100644 --- a/castor/stager/daemon/SetGCWeightHandler.hpp +++ b/castor/stager/daemon/SetGCWeightHandler.hpp @@ -29,13 +29,13 @@ namespace castor{ public: /* constructor */ - SetGCWeightHandler(RequestHelper* reqHelper) throw(castor::exception::Exception) : + SetGCWeightHandler(RequestHelper* reqHelper) : RequestHandler(reqHelper) {}; /* destructor */ ~SetGCWeightHandler() throw() {}; /* SetFileGCWeight handle implementation */ - virtual void handle() throw(castor::exception::Exception); + virtual void handle() ; }; //end SetGCWeightHandler class diff --git a/castor/stager/daemon/StagerDaemon.cpp b/castor/stager/daemon/StagerDaemon.cpp index c5fae1897535798748d96446fb6716ea8bf7387f..30f0f0f6f71964cb48d6019acd3d846161ca9369 100644 --- a/castor/stager/daemon/StagerDaemon.cpp +++ b/castor/stager/daemon/StagerDaemon.cpp @@ -152,7 +152,7 @@ int main(int argc, char* argv[]){ /* constructor: initiallizes the DLF logging and set the default value to its attributes */ /*****************************************************************************************/ castor::stager::daemon::StagerDaemon::StagerDaemon(std::ostream &stdOut, - std::ostream &stdErr, log::Logger &log) throw (castor::exception::Exception) + std::ostream &stdErr, log::Logger &log) : castor::server::MultiThreadedDaemon(stdOut, stdErr, log) { castor::dlf::Message stagerDlfMessages[]={ diff --git a/castor/stager/daemon/StagerDaemon.hpp b/castor/stager/daemon/StagerDaemon.hpp index 8123fbda36446c6a2abc03c3dc0e6d1449edbffa..ce323b5fb36df43d880e70a52555ff2c5b36f771 100644 --- a/castor/stager/daemon/StagerDaemon.hpp +++ b/castor/stager/daemon/StagerDaemon.hpp @@ -55,7 +55,7 @@ namespace castor{ * system. */ StagerDaemon(std::ostream &stdOut, std::ostream &stdErr, - log::Logger &log) throw (castor::exception::Exception); + log::Logger &log) ; /** * Destructor diff --git a/castor/tape/label/LabelCmd.cpp b/castor/tape/label/LabelCmd.cpp index 9443cf62348751f75cd233d3c8b6626e6b072ef3..15510d67cc4cd39ca0a721def76f1a59d9c21812 100644 --- a/castor/tape/label/LabelCmd.cpp +++ b/castor/tape/label/LabelCmd.cpp @@ -49,7 +49,7 @@ castor::tape::label::LabelCmd::LabelCmd() throw(): //------------------------------------------------------------------------------ // parseCommandLine //------------------------------------------------------------------------------ -void castor::tape::label::LabelCmd::parseCommandLine(const int argc, char **argv) throw(castor::exception::Exception) { +void castor::tape::label::LabelCmd::parseCommandLine(const int argc, char **argv) { static struct option longopts[] = { {"unitname", 1, NULL, 'u'}, @@ -262,7 +262,7 @@ int castor::tape::label::LabelCmd::main(const int argc, char **argv) throw() { //------------------------------------------------------------------------------ // executeCommand //------------------------------------------------------------------------------ -int castor::tape::label::LabelCmd::executeCommand() throw(castor::exception::Exception) { +int castor::tape::label::LabelCmd::executeCommand() { // This command cannot be ran as root if(m_userId == 0 && m_groupId == 0) { castor::exception::Exception ex(ECANCELED); diff --git a/castor/tape/label/LabelCmd.hpp b/castor/tape/label/LabelCmd.hpp index d790e82db1735aa3e76be9d18ab00f20f03b6e3c..d89775ba07712c53988f51343a5c567b068a669c 100644 --- a/castor/tape/label/LabelCmd.hpp +++ b/castor/tape/label/LabelCmd.hpp @@ -84,7 +84,7 @@ protected: * @param argv Argument vector from the executable's entry function: main(). */ void parseCommandLine(const int argc, char **argv) - throw(castor::exception::Exception); + ; /** * Writes the command-line usage message of to the specified output stream. @@ -105,7 +105,7 @@ protected: * * @return the return code contained in the reply message */ - int executeCommand() throw(castor::exception::Exception); + int executeCommand() ; /** * The command line structure diff --git a/castor/tape/rmc/AcceptHandler.cpp b/castor/tape/rmc/AcceptHandler.cpp index fc9481a3dd63ce303de5ad485dbce89538e39d3c..a87b11ab3f94710f2811a198865996c69c0cea09 100644 --- a/castor/tape/rmc/AcceptHandler.cpp +++ b/castor/tape/rmc/AcceptHandler.cpp @@ -73,7 +73,7 @@ void castor::tape::rmc::AcceptHandler::fillPollFd( // handleEvent //------------------------------------------------------------------------------ bool castor::tape::rmc::AcceptHandler::handleEvent( - const struct pollfd &fd) throw(castor::exception::Exception) { + const struct pollfd &fd) { { log::Param params[] = { log::Param("fd" , fd.fd ), @@ -148,7 +148,7 @@ bool castor::tape::rmc::AcceptHandler::handleEvent( // checkHandleEventFd //------------------------------------------------------------------------------ void castor::tape::rmc::AcceptHandler::checkHandleEventFd( - const int fd) throw (castor::exception::Exception) { + const int fd) { if(m_fd != fd) { castor::exception::Exception ex; ex.getMessage() << "Failed to accept connection from client" diff --git a/castor/tape/rmc/AcceptHandler.hpp b/castor/tape/rmc/AcceptHandler.hpp index bb78692d5af88a821ca7ca589a5fb7811c9062b4..2bcb96b8f656607bb12c878ebcae44abc4561f44 100644 --- a/castor/tape/rmc/AcceptHandler.hpp +++ b/castor/tape/rmc/AcceptHandler.hpp @@ -69,7 +69,7 @@ public: * the reactor. */ bool handleEvent(const struct pollfd &fd) - throw(castor::exception::Exception); + ; /** * Destructor. @@ -84,7 +84,7 @@ private: * Throws an exception if the specified file-descriptor is not that of the * socket listening for client connections. */ - void checkHandleEventFd(const int fd) throw (castor::exception::Exception); + void checkHandleEventFd(const int fd) ; /** * The file descriptor of the socket listening for client connections. diff --git a/castor/tape/rmc/Acs.cpp b/castor/tape/rmc/Acs.cpp index c6c2d83ab10f8729a188b0b08977c1acc1f9c6b0..3c2e4697f7b9c45f3568a83759046a9df6c6fdb8 100644 --- a/castor/tape/rmc/Acs.cpp +++ b/castor/tape/rmc/Acs.cpp @@ -40,7 +40,7 @@ castor::tape::rmc::Acs::~Acs() throw() { // str2DriveId //------------------------------------------------------------------------------ DRIVEID castor::tape::rmc::Acs::str2DriveId(const std::string &str) - const throw(castor::exception::InvalidArgument) { + const { std::vector<std::string> components; castor::utils::splitString(str, ':', components); @@ -49,7 +49,7 @@ DRIVEID castor::tape::rmc::Acs::str2DriveId(const std::string &str) castor::exception::InvalidArgument ex; ex.getMessage() << "Invalid number of components in drive ID" ": expected=4, actual=" << components.size(); - throw(ex); + throw ex; } const std::string &acsStr = components[0]; @@ -62,48 +62,48 @@ DRIVEID castor::tape::rmc::Acs::str2DriveId(const std::string &str) castor::exception::InvalidArgument ex; ex.getMessage() << "Invalid ACS string length" ": expected=1..3, actual=" << acsStr.length(); - throw(ex); + throw ex; } if(1 > lsmStr.length() || 3 < lsmStr.length()) { castor::exception::InvalidArgument ex; ex.getMessage() << "Invalid LSM string length" ": expected=1..3, actual=" << lsmStr.length(); - throw(ex); + throw ex; } if(1 > panStr.length() || 3 < panStr.length()) { castor::exception::InvalidArgument ex; ex.getMessage() << "Invalid panel string length" ": expected=1..3, actual=" << panStr.length(); - throw(ex); + throw ex; } if(1 > drvStr.length() || 3 < drvStr.length()) { castor::exception::InvalidArgument ex; ex.getMessage() << "Invalid drive string length" ": expected=1..3, actual=" << drvStr.length(); - throw(ex); + throw ex; } // Each of the 4 components must only contain numerals if(!onlyContainsNumerals(acsStr)) { castor::exception::InvalidArgument ex; ex.getMessage() << "ACS must only contain numerals: value=" << acsStr; - throw(ex); + throw ex; } if(!onlyContainsNumerals(lsmStr)) { castor::exception::InvalidArgument ex; ex.getMessage() << "LSM must only contain numerals: value=" << acsStr; - throw(ex); + throw ex; } if(!onlyContainsNumerals(panStr)) { castor::exception::InvalidArgument ex; ex.getMessage() << "Panel must only contain numerals: value=" << acsStr; - throw(ex); + throw ex; } if(!onlyContainsNumerals(drvStr)) { castor::exception::InvalidArgument ex; ex.getMessage() << "Drive/Transport must only contain numerals: value=" << acsStr; - throw(ex); + throw ex; } DRIVEID driveId; @@ -119,7 +119,7 @@ DRIVEID castor::tape::rmc::Acs::str2DriveId(const std::string &str) // str2Volid //------------------------------------------------------------------------------ VOLID castor::tape::rmc::Acs::str2Volid(const std::string &str) const - throw(castor::exception::InvalidArgument) { + { if(EXTERNAL_LABEL_SIZE < str.length()) { castor::exception::InvalidArgument ex; ex.getMessage() << "Failed to convert string to volume identifier" diff --git a/castor/tape/rmc/Acs.hpp b/castor/tape/rmc/Acs.hpp index 986d219d49ba727adb826e410fa51071e16846cf..f0d4308b938e1ab69b3a42766ab1ab78dba23087 100644 --- a/castor/tape/rmc/Acs.hpp +++ b/castor/tape/rmc/Acs.hpp @@ -58,7 +58,7 @@ public: * @return The drive ID object. */ DRIVEID str2DriveId(const std::string &str) const - throw(castor::exception::InvalidArgument); + ; /** * Returns the VOLID equibvalent of the specified string. @@ -70,7 +70,7 @@ public: * @return The VOLID representation of the volume identifier. */ VOLID str2Volid(const std::string &str) const - throw(castor::exception::InvalidArgument); + ; /** * Returns true if the specified string only contains numerals else false. diff --git a/castor/tape/rmc/AcsCmd.cpp b/castor/tape/rmc/AcsCmd.cpp index 1559c061d7ca3462eac8d1547476c24cc4e018da..93f910a4dedba4075739f27f24c4a7e852e6d1a0 100644 --- a/castor/tape/rmc/AcsCmd.cpp +++ b/castor/tape/rmc/AcsCmd.cpp @@ -56,7 +56,7 @@ void castor::tape::rmc::AcsCmd::requestResponsesUntilFinal( const SEQ_NO requestSeqNumber, ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)], const int queryInterval, const int timeout) - throw (castor::exception::RequestFailed) { + { ACS_RESPONSE_TYPE responseType = RT_NONE; int elapsedTime = 0; do { @@ -75,7 +75,7 @@ void castor::tape::rmc::AcsCmd::requestResponsesUntilFinal( if(elapsedTime >= timeout) { castor::exception::RequestFailed ex; ex.getMessage() << "Timed out after " << timeout << " seconds"; - throw(ex); + throw ex; } } while(RT_FINAL != responseType); @@ -88,7 +88,7 @@ void castor::tape::rmc::AcsCmd::requestResponsesUntilFinal( ACS_RESPONSE_TYPE castor::tape::rmc::AcsCmd::requestResponse( const int timeout, const SEQ_NO requestSeqNumber, ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::RequestFailed) { + { SEQ_NO responseSeqNumber = 0; REQ_ID reqId = (REQ_ID)0; ACS_RESPONSE_TYPE responseType = RT_NONE; @@ -116,11 +116,11 @@ ACS_RESPONSE_TYPE castor::tape::rmc::AcsCmd::requestResponse( //------------------------------------------------------------------------------ void castor::tape::rmc::AcsCmd::checkResponseSeqNumber( const SEQ_NO requestSeqNumber, const SEQ_NO responseSeqNumber) - throw(castor::exception::Mismatch) { + { if(requestSeqNumber != responseSeqNumber) { castor::exception::Mismatch ex; ex.getMessage() << ": Sequence number mismatch: requestSeqNumber=" << requestSeqNumber << " responseSeqNumber=" << responseSeqNumber; - throw(ex); + throw ex; } } diff --git a/castor/tape/rmc/AcsCmd.hpp b/castor/tape/rmc/AcsCmd.hpp index 972115f46524fdfaa087f92219bccb2df8338593..547bd831138f856a203257bb07a0e1fb3bd8e389 100644 --- a/castor/tape/rmc/AcsCmd.hpp +++ b/castor/tape/rmc/AcsCmd.hpp @@ -95,7 +95,7 @@ protected: void requestResponsesUntilFinal(const SEQ_NO requestSeqNumber, ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)], const int queryInterval, const int timeout) - throw (castor::exception::RequestFailed); + ; /** * Sends a request for a response to the ACSLS. @@ -110,7 +110,7 @@ protected: ACS_RESPONSE_TYPE requestResponse(const int timeout, const SEQ_NO requestSeqNumber, ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::RequestFailed); + ; /** * Throws castor::exception::Mismatch if the specified request and @@ -120,7 +120,7 @@ protected: * @param responseSeqNumber Response sequence-number. */ void checkResponseSeqNumber(const SEQ_NO requestSeqNumber, - const SEQ_NO responseSeqNumber) throw(castor::exception::Mismatch); + const SEQ_NO responseSeqNumber) ; }; // class AcsCmd diff --git a/castor/tape/rmc/AcsDismountCmd.cpp b/castor/tape/rmc/AcsDismountCmd.cpp index 86fa11f30de7274e12fd8baf7c58d2cd873e26d7..4b93878957bc598401edb3591077cd8d9a2b939d 100644 --- a/castor/tape/rmc/AcsDismountCmd.cpp +++ b/castor/tape/rmc/AcsDismountCmd.cpp @@ -259,7 +259,7 @@ castor::tape::rmc::AcsDismountCmdLine // syncDismount //------------------------------------------------------------------------------ void castor::tape::rmc::AcsDismountCmd::syncDismount() - throw(castor::exception::DismountFailed) { + { const SEQ_NO requestSeqNumber = 1; ALIGNED_BYTES buf[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]; @@ -280,7 +280,7 @@ void castor::tape::rmc::AcsDismountCmd::syncDismount() // sendDismountRequest //------------------------------------------------------------------------------ void castor::tape::rmc::AcsDismountCmd::sendDismountRequest( - const SEQ_NO seqNumber) throw (castor::exception::DismountFailed) { + const SEQ_NO seqNumber) { const LOCKID lockId = 0; // No lock m_dbg << "Calling Acs::dismount()" << std::endl; @@ -293,7 +293,7 @@ void castor::tape::rmc::AcsDismountCmd::sendDismountRequest( m_cmdLine.volId.external_label << " from drive " << m_acs.driveId2Str(m_cmdLine.driveId) << ": force=" << (m_cmdLine.force ? "TRUE" : "FALSE") << ": " << acs_status(s); - throw(ex); + throw ex; } } @@ -302,13 +302,13 @@ void castor::tape::rmc::AcsDismountCmd::sendDismountRequest( //------------------------------------------------------------------------------ void castor::tape::rmc::AcsDismountCmd::processDismountResponse( ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::DismountFailed) { + { const ACS_DISMOUNT_RESPONSE *const msg = (ACS_DISMOUNT_RESPONSE *)buf; if(STATUS_SUCCESS != msg->dismount_status) { castor::exception::DismountFailed ex; ex.getMessage() << "Status of dismount response is not success: " << acs_status(msg->dismount_status); - throw(ex); + throw ex; } } diff --git a/castor/tape/rmc/AcsDismountCmd.hpp b/castor/tape/rmc/AcsDismountCmd.hpp index adc2092123eccd7ab4130df3efe9a387c3256dda..5aa5bcff14b3d49b905284d731dcdf1af8c4e10c 100644 --- a/castor/tape/rmc/AcsDismountCmd.hpp +++ b/castor/tape/rmc/AcsDismountCmd.hpp @@ -98,7 +98,7 @@ protected: * @param queryInterval The amount of time in seconds to wait between * querying ACS for responses. */ - void syncDismount() throw(castor::exception::DismountFailed); + void syncDismount() ; /** * Sends the dismount request to ACSLS. @@ -106,7 +106,7 @@ protected: * @param seqNumber The sequence number to be used in the request. */ void sendDismountRequest(const SEQ_NO seqNumber) - throw(castor::exception::DismountFailed); + ; /** * Throws castor::exception::DismountFailed if the mount was not @@ -116,7 +116,7 @@ protected: */ void processDismountResponse( ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::DismountFailed); + ; private: diff --git a/castor/tape/rmc/AcsMountCmd.cpp b/castor/tape/rmc/AcsMountCmd.cpp index 21073a73b39bd4a1066b0ea11db126405294c73d..00a845d29d10ed792e3da836a5b86e658a5212f9 100644 --- a/castor/tape/rmc/AcsMountCmd.cpp +++ b/castor/tape/rmc/AcsMountCmd.cpp @@ -256,7 +256,7 @@ void castor::tape::rmc::AcsMountCmd::usage(std::ostream &os) // syncMount //------------------------------------------------------------------------------ void castor::tape::rmc::AcsMountCmd::syncMount() - throw(castor::exception::MountFailed) { + { const SEQ_NO requestSeqNumber = 1; ALIGNED_BYTES buf[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]; @@ -277,7 +277,7 @@ void castor::tape::rmc::AcsMountCmd::syncMount() // sendMountRequest //------------------------------------------------------------------------------ void castor::tape::rmc::AcsMountCmd::sendMountRequest( - const SEQ_NO seqNumber) throw(castor::exception::MountFailed) { + const SEQ_NO seqNumber) { const LOCKID lockId = 0; // No lock const BOOLEAN bypass = FALSE; @@ -301,13 +301,13 @@ void castor::tape::rmc::AcsMountCmd::sendMountRequest( //------------------------------------------------------------------------------ void castor::tape::rmc::AcsMountCmd::processMountResponse( ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::MountFailed) { + { const ACS_MOUNT_RESPONSE *const msg = (ACS_MOUNT_RESPONSE *)buf; if(STATUS_SUCCESS != msg->mount_status) { castor::exception::MountFailed ex; ex.getMessage() << "Status of mount response is not success: " << acs_status(msg->mount_status); - throw(ex); + throw ex; } } diff --git a/castor/tape/rmc/AcsMountCmd.hpp b/castor/tape/rmc/AcsMountCmd.hpp index d6d99fd254fcfc7b8eebddcc659b0b5811704fb8..42a3a8cdfabda09dc0ed21d6b52f4774b1a7a400 100644 --- a/castor/tape/rmc/AcsMountCmd.hpp +++ b/castor/tape/rmc/AcsMountCmd.hpp @@ -93,7 +93,7 @@ protected: * This method does not return until the mount has either suceeded, failed or * the specified timeout has been reached. */ - void syncMount() throw(castor::exception::MountFailed); + void syncMount() ; /** * Sends the mount request to ACSLS. @@ -101,7 +101,7 @@ protected: * @param seqNumber The sequence number to be used in the request. */ void sendMountRequest(const SEQ_NO seqNumber) - throw(castor::exception::MountFailed); + ; /** * Throws castor::exception::DismountFailed if the mount was not @@ -111,7 +111,7 @@ protected: */ void processMountResponse( ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::MountFailed); + ; private: diff --git a/castor/tape/rmc/AcsQueryVolumeCmd.cpp b/castor/tape/rmc/AcsQueryVolumeCmd.cpp index 7ea90bfecc65bc82311fd35066c84fa4f922caa1..5eeb790997a85307d34f0eee5d76e65d4f0f00da 100644 --- a/castor/tape/rmc/AcsQueryVolumeCmd.cpp +++ b/castor/tape/rmc/AcsQueryVolumeCmd.cpp @@ -235,7 +235,7 @@ void castor::tape::rmc::AcsQueryVolumeCmd::usage(std::ostream &os) // syncQueryVolume //------------------------------------------------------------------------------ void castor::tape::rmc::AcsQueryVolumeCmd::syncQueryVolume() - throw(castor::exception::QueryVolumeFailed) { + { const SEQ_NO requestSeqNumber = 1; ALIGNED_BYTES buf[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]; @@ -256,7 +256,7 @@ void castor::tape::rmc::AcsQueryVolumeCmd::syncQueryVolume() // sendQueryVolumeRequest //------------------------------------------------------------------------------ void castor::tape::rmc::AcsQueryVolumeCmd::sendQueryVolumeRequest( - const SEQ_NO seqNumber) throw (castor::exception::QueryVolumeFailed) { + const SEQ_NO seqNumber) { VOLID volIds[MAX_ID]; memset(volIds, '\0', sizeof(volIds)); @@ -282,7 +282,7 @@ void castor::tape::rmc::AcsQueryVolumeCmd::sendQueryVolumeRequest( void castor::tape::rmc::AcsQueryVolumeCmd::processQueryResponse( std::ostream &os, ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::QueryVolumeFailed) { + { const ACS_QUERY_VOL_RESPONSE *const msg = (ACS_QUERY_VOL_RESPONSE *)buf; @@ -290,7 +290,7 @@ void castor::tape::rmc::AcsQueryVolumeCmd::processQueryResponse( castor::exception::QueryVolumeFailed ex; ex.getMessage() << "Status of query response is not success: " << acs_status(msg->query_vol_status); - throw(ex); + throw ex; } if((unsigned short)1 != msg->count) { diff --git a/castor/tape/rmc/AcsQueryVolumeCmd.hpp b/castor/tape/rmc/AcsQueryVolumeCmd.hpp index 50f9d8663adabeb80d38d0c6cc3d6e49fdec669f..43795ed85915ae2fc9badcbaee2e05ff0d40089a 100644 --- a/castor/tape/rmc/AcsQueryVolumeCmd.hpp +++ b/castor/tape/rmc/AcsQueryVolumeCmd.hpp @@ -97,7 +97,7 @@ protected: * @return The volume status of the volume identifier specified on the * command-line. */ - void syncQueryVolume() throw(castor::exception::QueryVolumeFailed); + void syncQueryVolume() ; /** * Sends the query volume request to ACSLS. @@ -105,7 +105,7 @@ protected: * @param seqNumber The sequence number to be used in the request. */ void sendQueryVolumeRequest(const SEQ_NO seqNumber) - throw (castor::exception::QueryVolumeFailed); + ; /** * Extracts the volume status from the specified query-response message and @@ -116,7 +116,7 @@ protected: */ void processQueryResponse(std::ostream &os, ALIGNED_BYTES (&buf)[MAX_MESSAGE_SIZE / sizeof(ALIGNED_BYTES)]) - throw(castor::exception::QueryVolumeFailed); + ; /** * Writes a human readable representation of the specified volume status to diff --git a/castor/tape/rmc/ConnectionHandler.cpp b/castor/tape/rmc/ConnectionHandler.cpp index e7766f435dd249b08633822d03c9d4bd2ab4d80d..f72290870f5a327b0e20efea8a677040ecbc269a 100644 --- a/castor/tape/rmc/ConnectionHandler.cpp +++ b/castor/tape/rmc/ConnectionHandler.cpp @@ -64,7 +64,7 @@ void castor::tape::rmc::ConnectionHandler::fillPollFd(struct pollfd &fd) throw() //------------------------------------------------------------------------------ // handleEvent //------------------------------------------------------------------------------ -bool castor::tape::rmc::ConnectionHandler::handleEvent(const struct pollfd &fd) throw(castor::exception::Exception) { +bool castor::tape::rmc::ConnectionHandler::handleEvent(const struct pollfd &fd) { std::list<log::Param> params; params.push_back(log::Param("fd" , fd.fd )); params.push_back(log::Param("POLLIN" , fd.revents & POLLIN ? "true" : "false")); @@ -101,7 +101,7 @@ bool castor::tape::rmc::ConnectionHandler::handleEvent(const struct pollfd &fd) //------------------------------------------------------------------------------ // checkHandleEventFd //------------------------------------------------------------------------------ -void castor::tape::rmc::ConnectionHandler::checkHandleEventFd(const int fd) throw (castor::exception::Exception) { +void castor::tape::rmc::ConnectionHandler::checkHandleEventFd(const int fd) { if(m_fd != fd) { castor::exception::Exception ex; ex.getMessage() << "Failed to handle client connection" diff --git a/castor/tape/rmc/ConnectionHandler.hpp b/castor/tape/rmc/ConnectionHandler.hpp index 941c4f250b3f627717b5795424f14c920b854a6a..6ead46a5d0011a25588582fbb16c4bee80fd9968 100644 --- a/castor/tape/rmc/ConnectionHandler.hpp +++ b/castor/tape/rmc/ConnectionHandler.hpp @@ -69,7 +69,7 @@ public: * * @param fd The poll file-descriptor describing the event. */ - bool handleEvent(const struct pollfd &fd) throw(castor::exception::Exception); + bool handleEvent(const struct pollfd &fd) ; /** * Destructor. @@ -105,7 +105,7 @@ private: * Throws an exception if the specified file-descriptor is not that of the * connection with the client. */ - void checkHandleEventFd(const int fd) throw (castor::exception::Exception); + void checkHandleEventFd(const int fd) ; /** * Returns true if the peer host of the connection being handled is diff --git a/castor/tape/rmc/RmcDaemon.cpp b/castor/tape/rmc/RmcDaemon.cpp index 74a6e048ca587a53698e3aea12d19d8a45677254..2f33ac4bb3e19e92a3b256d8d29baffdf3240668 100644 --- a/castor/tape/rmc/RmcDaemon.cpp +++ b/castor/tape/rmc/RmcDaemon.cpp @@ -50,7 +50,7 @@ castor::tape::rmc::RmcDaemon::RmcDaemon::RmcDaemon( std::ostream &stdErr, log::Logger &log, io::PollReactor &reactor, - legacymsg::CupvProxy &cupv) throw(castor::exception::Exception): + legacymsg::CupvProxy &cupv) : castor::server::Daemon(stdOut, stdErr, log), m_reactor(reactor), m_cupv(cupv), @@ -63,7 +63,7 @@ castor::tape::rmc::RmcDaemon::RmcDaemon::RmcDaemon( // getHostName //------------------------------------------------------------------------------ std::string castor::tape::rmc::RmcDaemon::RmcDaemon::getHostName() - const throw(castor::exception::Exception) { + const { char nameBuf[81]; if(gethostname(nameBuf, sizeof(nameBuf))) { char errBuf[100]; @@ -80,7 +80,7 @@ std::string castor::tape::rmc::RmcDaemon::RmcDaemon::getHostName() // getRmcPort //------------------------------------------------------------------------------ unsigned short castor::tape::rmc::RmcDaemon::getRmcPort() - throw(castor::exception::Exception) { + { std::string configParamValue; // If RMC PORT is not in /etc/castor.conf then use the compile time default @@ -108,7 +108,7 @@ unsigned short castor::tape::rmc::RmcDaemon::getRmcPort() std::string castor::tape::rmc::RmcDaemon::getConfigParam( const std::string &category, const std::string &name) - throw(castor::exception::Exception) { + { std::ostringstream task; task << "get " << category << ":" << name << " from castor.conf"; @@ -145,7 +145,7 @@ castor::tape::rmc::RmcDaemon::~RmcDaemon() throw() { //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int castor::tape::rmc::RmcDaemon::main(const int argc, char **const argv) throw () { +int castor::tape::rmc::RmcDaemon::main(const int argc, char **const argv) throw() { try { exceptionThrowingMain(argc, argv); @@ -171,7 +171,7 @@ int castor::tape::rmc::RmcDaemon::main(const int argc, char **const argv) throw // exceptionThrowingMain //------------------------------------------------------------------------------ void castor::tape::rmc::RmcDaemon::exceptionThrowingMain( - const int argc, char **const argv) throw(castor::exception::Exception) { + const int argc, char **const argv) { logStartOfDaemon(argc, argv); parseCommandLine(argc, argv); daemonizeIfNotRunInForeground(); @@ -215,7 +215,7 @@ std::string castor::tape::rmc::RmcDaemon::argvToString( // blockSignals //------------------------------------------------------------------------------ void castor::tape::rmc::RmcDaemon::blockSignals() const - throw(castor::exception::Exception) { + { sigset_t sigs; sigemptyset(&sigs); // The signals that should not asynchronously disturb the daemon @@ -242,14 +242,14 @@ void castor::tape::rmc::RmcDaemon::blockSignals() const // setUpReactor //------------------------------------------------------------------------------ void castor::tape::rmc::RmcDaemon::setUpReactor() - throw(castor::exception::Exception) { + { createAndRegisterAcceptHandler(); } //------------------------------------------------------------------------------ // createAndRegisterAcceptHandler //------------------------------------------------------------------------------ -void castor::tape::rmc::RmcDaemon::createAndRegisterAcceptHandler() throw(castor::exception::Exception) { +void castor::tape::rmc::RmcDaemon::createAndRegisterAcceptHandler() { castor::utils::SmartFd listenSock; try { listenSock.reset(io::createListenerSock(m_rmcPort)); @@ -284,7 +284,7 @@ void castor::tape::rmc::RmcDaemon::createAndRegisterAcceptHandler() throw(castor // mainEventLoop //------------------------------------------------------------------------------ void castor::tape::rmc::RmcDaemon::mainEventLoop() - throw(castor::exception::Exception) { + { while(handleEvents()) { forkChildProcesses(); } @@ -294,7 +294,7 @@ void castor::tape::rmc::RmcDaemon::mainEventLoop() // handleEvents //------------------------------------------------------------------------------ bool castor::tape::rmc::RmcDaemon::handleEvents() - throw(castor::exception::Exception) { + { const int timeout = 100; // 100 milliseconds m_reactor.handleEvents(timeout); return handlePendingSignals(); diff --git a/castor/tape/rmc/RmcDaemon.hpp b/castor/tape/rmc/RmcDaemon.hpp index d6a794311f023f6d61f09c1b991dcdd1a83a304a..a9f9dbdf0a87a79ea0b5bd6af1d8e674dcd6c925 100644 --- a/castor/tape/rmc/RmcDaemon.hpp +++ b/castor/tape/rmc/RmcDaemon.hpp @@ -57,7 +57,7 @@ public: std::ostream &stdErr, log::Logger &log, io::PollReactor &reactor, - legacymsg::CupvProxy &cupv) throw(castor::exception::Exception); + legacymsg::CupvProxy &cupv) ; /** * Destructor. @@ -78,13 +78,13 @@ protected: /** * Returns the name of the host on which the daemon is running. */ - std::string getHostName() const throw(castor::exception::Exception); + std::string getHostName() const ; /** * Determines and returns the TCP/IP port onwhich the rmcd daemon should * listen for client connections. */ - unsigned short getRmcPort() throw(castor::exception::Exception); + unsigned short getRmcPort() ; /** * Tries to get the value of the specified parameter from parsing @@ -93,7 +93,7 @@ protected: * @param category The category of the configuration parameter. * @param name The name of the configuration parameter. */ - std::string getConfigParam(const std::string &category, const std::string &name) throw(castor::exception::Exception); + std::string getConfigParam(const std::string &category, const std::string &name) ; /** * Exception throwing main() function. @@ -102,7 +102,7 @@ protected: * @param argv The array of command-line arguments. */ void exceptionThrowingMain(const int argc, char **const argv) - throw(castor::exception::Exception); + ; /** * Logs the start of the daemon. @@ -122,30 +122,30 @@ protected: /** * Blocks the signals that should not asynchronously disturb the daemon. */ - void blockSignals() const throw(castor::exception::Exception); + void blockSignals() const ; /** * Sets up the reactor. */ - void setUpReactor() throw(castor::exception::Exception); + void setUpReactor() ; /** * Creates the handler to accept client connections and registers it with * the reactor. */ - void createAndRegisterAcceptHandler() throw(castor::exception::Exception); + void createAndRegisterAcceptHandler() ; /** * The main event loop of the daemon. */ - void mainEventLoop() throw(castor::exception::Exception); + void mainEventLoop() ; /** * Handles any pending events. * * @return True if the main event loop should continue, else false. */ - bool handleEvents() throw(castor::exception::Exception); + bool handleEvents() ; /** * Handles any pending signals. diff --git a/castor/tape/rmc/RmcDaemonMain.cpp b/castor/tape/rmc/RmcDaemonMain.cpp index 214049ae647254de2908b1b146500bed86620447..7aca74bff0982db61ad6f8f334d9672ed334ee4f 100644 --- a/castor/tape/rmc/RmcDaemonMain.cpp +++ b/castor/tape/rmc/RmcDaemonMain.cpp @@ -37,7 +37,7 @@ // Tries to get the value of the specified parameter from parsing // /etc/castor/castor.conf. //------------------------------------------------------------------------------ -static std::string getConfigParam(const std::string &category, const std::string &name) throw(castor::exception::Exception); +static std::string getConfigParam(const std::string &category, const std::string &name) throw castor::exception::Exception; //------------------------------------------------------------------------------ // exceptionThrowingMain @@ -103,7 +103,7 @@ static int exceptionThrowingMain(const int argc, char **const argv, castor::log: //------------------------------------------------------------------------------ // getConfigParam //------------------------------------------------------------------------------ -static std::string getConfigParam(const std::string &category, const std::string &name) throw(castor::exception::Exception) { +static std::string getConfigParam(const std::string &category, const std::string &name) { using namespace castor; std::ostringstream task; diff --git a/castor/tape/tapebridge/BridgeClientInfo2Sender.cpp b/castor/tape/tapebridge/BridgeClientInfo2Sender.cpp index 9c9556587e60c09f1d8d51305e086346e38db2ae..d7f6c77a5c771c25fb65acc3c51a9ac8cd1a1e07 100644 --- a/castor/tape/tapebridge/BridgeClientInfo2Sender.cpp +++ b/castor/tape/tapebridge/BridgeClientInfo2Sender.cpp @@ -54,7 +54,7 @@ void castor::tape::tapebridge::BridgeClientInfo2Sender::send( const int netReadWriteTimeout, tapeBridgeClientInfo2MsgBody_t &msgBody, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception) { + { if(rtcpdHost.length() == 0) { TAPE_THROW_EX(castor::exception::InvalidArgument, @@ -107,7 +107,7 @@ void castor::tape::tapebridge::BridgeClientInfo2Sender::readReply( castor::io::AbstractTCPSocket &sock, const int netReadWriteTimeout, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception) { + { // Read in the message header char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len diff --git a/castor/tape/tapebridge/BridgeClientInfo2Sender.hpp b/castor/tape/tapebridge/BridgeClientInfo2Sender.hpp index 7406e1e52ca6fb59e12a5ed7c24d5242a82bb7bf..7c11f09f23a39b1ad58baa74c90a9beeb24ff233 100644 --- a/castor/tape/tapebridge/BridgeClientInfo2Sender.hpp +++ b/castor/tape/tapebridge/BridgeClientInfo2Sender.hpp @@ -58,7 +58,7 @@ namespace tapebridge { const int netReadWriteTimeout, tapeBridgeClientInfo2MsgBody_t &msgBody, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception); + ; private: @@ -76,7 +76,7 @@ namespace tapebridge { castor::io::AbstractTCPSocket &sock, const int netReadWriteTimeout, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception); + ; }; // class BridgeClientInfo2Sender diff --git a/castor/tape/tapebridge/BridgeProtocolEngine.cpp b/castor/tape/tapebridge/BridgeProtocolEngine.cpp index dfdbb9fe5d0c62f64af53a6c025a98bd28b2ffb6..a540c6f85a6e9d1c64e3dcaff2cc8fdbf10e9ce5 100644 --- a/castor/tape/tapebridge/BridgeProtocolEngine.cpp +++ b/castor/tape/tapebridge/BridgeProtocolEngine.cpp @@ -91,7 +91,7 @@ castor::tape::tapebridge::BridgeProtocolEngine::BridgeProtocolEngine( const bool checkRtcpdIsConnectingFromLocalHost, IClientProxy &clientProxy, ILegacyTxRx &legacyTxRx) - throw(castor::exception::Exception) : + : m_fileCloser(fileCloser), m_bulkRequestConfigParams(bulkRequestConfigParams), m_tapeFlushConfigParams(tapeFlushConfigParams), @@ -127,7 +127,7 @@ castor::tape::tapebridge::BridgeProtocolEngine::BridgeProtocolEngine( // acceptRtcpdConnection //----------------------------------------------------------------------------- int castor::tape::tapebridge::BridgeProtocolEngine::acceptRtcpdConnection() - throw(castor::exception::Exception) { + { castor::utils::SmartFd connectedSock; const int timeout = 5; // Seconds @@ -148,7 +148,7 @@ int castor::tape::tapebridge::BridgeProtocolEngine::acceptRtcpdConnection() castor::exception::Exception ex(ECANCELED); ex.getMessage() << "Stopping gracefully"; - throw(ex); + throw ex; } } @@ -175,7 +175,7 @@ int castor::tape::tapebridge::BridgeProtocolEngine::acceptRtcpdConnection() void castor::tape::tapebridge::BridgeProtocolEngine:: logCallbackConnectionFromRtcpd( const int connectedSock) - throw(castor::exception::Exception) { + { try { char hostName[io::HOSTNAMEBUFLEN]; @@ -322,7 +322,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine::processSocksInALoop() castor::exception::Exception ex(ECANCELED); ex.getMessage() << "Stopping gracefully"; - throw(ex); + throw ex; } handleSelectEvents(selectTimeout); @@ -474,7 +474,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine::processAPendingSocket( // processPendingListenSocket //------------------------------------------------------------------------------ void castor::tape::tapebridge::BridgeProtocolEngine:: - processPendingListenSocket() throw(castor::exception::Exception) { + processPendingListenSocket() { const int acceptedConnection = acceptRtcpdConnection(); // Accept the connection @@ -491,7 +491,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: // checkPeerIsLocalhost //----------------------------------------------------------------------------- void castor::tape::tapebridge::BridgeProtocolEngine::checkPeerIsLocalhost( - const int socketFd) throw(castor::exception::Exception) { + const int socketFd) { const io::IpAndPort peerIpAndPort = io::getPeerIpPort(socketFd); @@ -515,7 +515,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine::checkPeerIsLocalhost( //------------------------------------------------------------------------------ void castor::tape::tapebridge::BridgeProtocolEngine:: processPendingInitialRtcpdSocket(const int pendingSock) - throw(castor::exception::Exception) { + { // Check function arguments if(pendingSock < 0) { @@ -1003,7 +1003,7 @@ bool castor::tape::tapebridge::BridgeProtocolEngine::startMigrationSession() ": expected=" << (m_nextDestinationTapeFSeq) << ": actual=" << firstFileToMigrate->fseq(); - throw(ex); + throw ex; } m_nextDestinationTapeFSeq++; @@ -1020,7 +1020,7 @@ bool castor::tape::tapebridge::BridgeProtocolEngine::startMigrationSession() ex2.getMessage() << "Failed to " << task << ": " << ex.getMessage().str(); - throw(ex2); + throw ex2; } // Give volume to rtcpd @@ -1504,7 +1504,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine::processRtcpFileErrReqDump( void castor::tape::tapebridge::BridgeProtocolEngine::processRtcpWaiting( const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception) { + { // Reply to rtcpd with a positive acknowledgement legacymsg::MessageHeader ackMsg; @@ -1677,7 +1677,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception) { + { const uint64_t tapebridgeTransId = m_tapebridgeTransactionCounter.next(); // Only the tapegatewayd daemon supports the bulk prototcol @@ -1777,7 +1777,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception) { + { const uint64_t tapebridgeTransId = m_tapebridgeTransactionCounter.next(); // Only the tapegatewayd daemon supports the bulk prototcol @@ -1839,7 +1839,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: const uint32_t rtcpdReqMagic, const uint32_t rtcpdReqType, const std::string &rtcpdReqTapePath) - throw(castor::exception::Exception) { + { if(m_filesToRecall.empty()) { // This should never happen @@ -1868,7 +1868,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine::sendFileToRecallToRtcpd( const uint32_t rtcpdReqMagic, const uint32_t rtcpdReqType, const std::string &rtcpdReqTapePath) - throw(castor::exception::Exception) { + { // Remember the file transaction ID and get its unique index to be // passed to rtcpd through the "rtcpFileRequest.disk_fseq" message @@ -1979,7 +1979,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine::sendFileToRecallToRtcpd( void castor::tape::tapebridge::BridgeProtocolEngine:: processRtcpFilePositionedRequest(const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception) { + { // Reply to rtcpd with a positive acknowledgement legacymsg::MessageHeader ackMsg; @@ -2078,7 +2078,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: void castor::tape::tapebridge::BridgeProtocolEngine:: processRtcpFileFinishedRequest(const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception) { + { // Reply to rtcpd with a positive acknowledgement legacymsg::MessageHeader ackMsg; @@ -2249,7 +2249,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: processSuccessfullRtcpFileFinishedRequest( const uint64_t fileTransactonId, const legacymsg::RtcpFileRqstErrMsgBody &body) - throw(castor::exception::Exception) { + { // If migrating if(m_volume.mode() == tapegateway::WRITE) { @@ -2269,7 +2269,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: processSuccessfullRtcpWriteFileFinishedRequest( const uint64_t fileTransactonId, const legacymsg::RtcpFileRqstErrMsgBody &body) - throw(castor::exception::Exception) { + { // Mark the migrated file as written but not yet flushed to tape. This // includes created the file-migrated notification message that will be // sent to the tapegatewayd daemon once the rtcpd daemon has @@ -2314,7 +2314,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: processSuccessfullRtcpRecallFileFinishedRequest( const uint64_t fileTransactonId, const legacymsg::RtcpFileRqstErrMsgBody &body) - throw(castor::exception::Exception) { + { const uint64_t fileSize = body.rqst.bytesOut; // "out" from the tape const uint64_t tapebridgeTransId = m_tapebridgeTransactionCounter.next(); @@ -2448,7 +2448,7 @@ void // rtcpEndOfReqRtcpdCallback //----------------------------------------------------------------------------- void castor::tape::tapebridge::BridgeProtocolEngine::rtcpEndOfReqRtcpdCallback( - const int socketFd) throw(castor::exception::Exception) { + const int socketFd) { // Reply to rtcpd with a positive acknowledgement legacymsg::MessageHeader ackMsg; @@ -2735,7 +2735,7 @@ double castor::tape::tapebridge::BridgeProtocolEngine:: // calcSumOfFileSizes //----------------------------------------------------------------------------- uint64_t castor::tape::tapebridge::BridgeProtocolEngine::calcSumOfFileSizes( - const FileWrittenNotificationList &migrations) throw () { + const FileWrittenNotificationList &migrations) throw() { uint64_t totalFileSize = 0; for(FileWrittenNotificationList::const_iterator itor = migrations.begin(); @@ -2755,7 +2755,7 @@ uint64_t castor::tape::tapebridge::BridgeProtocolEngine::calcSumOfFileSizes( void castor::tape::tapebridge::BridgeProtocolEngine:: sendFlushedMigrationsToClient( const FileWrittenNotificationList ¬ifications) - throw (castor::exception::Exception) { + { // Get the next tape-bridge (aggregator) transaction id const uint64_t tapebridgeTransId = m_tapebridgeTransactionCounter.next(); @@ -2832,7 +2832,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: void castor::tape::tapebridge::BridgeProtocolEngine::giveOutpRtcpdCallback( const legacymsg::MessageHeader &header, const int socketFd) - throw(castor::exception::Exception) { + { legacymsg::GiveOutpMsgBody body; @@ -3248,7 +3248,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: noMoreFilesClientCallback( IObject *const obj, const GetMoreWorkConnection &getMoreWorkConnection) - throw(castor::exception::Exception) { + { // Down cast the reply to its specific class const tapegateway::NoMoreFiles *reply = @@ -3314,7 +3314,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: const int rtcpdSock, const uint32_t rtcpdReqMagic, const uint32_t rtcpdReqType) - throw(castor::exception::Exception) { + { // If migrating files to tape, then notify the internal pending-migration // store that there are no more files to migrate. @@ -3358,7 +3358,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: endNotificationErrorReportForGetMoreWorkClientCallback( IObject *const obj, const GetMoreWorkConnection &getMoreWorkConnection) - throw(castor::exception::Exception) { + { // Down cast the reply to its specific class const tapegateway::EndNotificationErrorReport *reply = @@ -3422,7 +3422,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: // notifyRtcpdEndOfSession //----------------------------------------------------------------------------- void castor::tape::tapebridge::BridgeProtocolEngine::notifyRtcpdEndOfSession() - throw(castor::exception::Exception) { + { // Send an RTCP_ENDOF_REQ message to rtcpd via the initial callback // connection @@ -3547,7 +3547,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: void castor::tape::tapebridge::BridgeProtocolEngine:: notifyClientOfFailedMigrations(const Cuuid_t &cuuid, const std::list<SessionError> &sessionErrors) - throw(castor::exception::Exception) { + { // Return if there are no errors to report if(sessionErrors.empty()) { @@ -3622,7 +3622,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: void castor::tape::tapebridge::BridgeProtocolEngine:: notifyClientOfFailedRecalls(const Cuuid_t &cuuid, const std::list<SessionError> &sessionErrors) - throw(castor::exception::Exception) { + { // Return if there are no errors to report if(sessionErrors.empty()) { @@ -3799,7 +3799,7 @@ void castor::tape::tapebridge::BridgeProtocolEngine:: generateMigrationTapeFileId( const uint64_t i, char (&dst)[CA_MAXPATHLEN+1]) - const throw(castor::exception::Exception) { + const { const char hexDigits[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; diff --git a/castor/tape/tapebridge/BridgeProtocolEngine.hpp b/castor/tape/tapebridge/BridgeProtocolEngine.hpp index ef4f97d36c0756e64d9f4ee03db710b5f9eae671..79decb0f985ab83f1a86cec18009b097f35bc05f 100644 --- a/castor/tape/tapebridge/BridgeProtocolEngine.hpp +++ b/castor/tape/tapebridge/BridgeProtocolEngine.hpp @@ -133,7 +133,7 @@ public: const bool checkRtcpdIsConnectingFromLocalHost, IClientProxy &clientProxy, ILegacyTxRx &legacyTxRx) - throw(castor::exception::Exception); + ; /** * Run a dump/migration/recall session. @@ -362,7 +362,7 @@ protected: /** * Accepts an rtcpd connection using the specified listener-socket. */ - int acceptRtcpdConnection() throw(castor::exception::Exception); + int acceptRtcpdConnection() ; /** * Logs the peer IP, port and host name of the specified callback connection @@ -374,7 +374,7 @@ protected: * @param connectedSock The newly accepted connection-socket. */ void logCallbackConnectionFromRtcpd(const int connectedSock) - throw(castor::exception::Exception); + ; /** * Processes a pending socket from the result of calling select(). @@ -395,7 +395,7 @@ protected: * Please note that this method will modify the catalogue of * socket-descriptors as necessary. */ - void processPendingListenSocket() throw (castor::exception::Exception); + void processPendingListenSocket() ; /** * Processes the specified socket which must be both pending and the initial @@ -404,7 +404,7 @@ protected: * @param pendingSock the file descriptior of the pending socket. */ void processPendingInitialRtcpdSocket(const int pendingSock) - throw (castor::exception::Exception); + ; /** * Processes the specified socket which must be both pending and an rtcpd @@ -562,7 +562,7 @@ protected: */ void processRtcpWaiting(const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception); + ; /** * Processes the specified RTCP file request for more work. @@ -602,7 +602,7 @@ protected: const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception); + ; /** * Takes a file to migrate request from the cache and sends it to the rtcpd @@ -642,7 +642,7 @@ protected: const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception); + ; /** * Takes a file to recall request from the cache and sends it to the rtcpd @@ -661,7 +661,7 @@ protected: const uint32_t rtcpdReqMagic, const uint32_t rtcpdReqType, const std::string &rtcpdReqTapePath) - throw(castor::exception::Exception); + ; /** * Sends the specified file to recall to the rtcpd daemon. @@ -681,7 +681,7 @@ protected: const uint32_t rtcpdReqMagic, const uint32_t rtcpdReqType, const std::string &rtcpdReqTapePath) - throw(castor::exception::Exception); + ; /** * Processes the specified RTCP file positioned request. @@ -700,7 +700,7 @@ protected: */ void processRtcpFilePositionedRequest(const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception); + ; /** * Processes the specified RTCP file transfer finished request. @@ -729,7 +729,7 @@ protected: */ void processRtcpFileFinishedRequest(const legacymsg::MessageHeader &header, legacymsg::RtcpFileRqstErrMsgBody &body, const int rtcpdSock) - throw(castor::exception::Exception); + ; /** * Processes the specified successful (no embedded error message) RTCP file @@ -743,7 +743,7 @@ protected: void processSuccessfullRtcpFileFinishedRequest( const uint64_t fileTransactonId, const legacymsg::RtcpFileRqstErrMsgBody &body) - throw(castor::exception::Exception); + ; /** @@ -761,7 +761,7 @@ protected: void processSuccessfullRtcpWriteFileFinishedRequest( const uint64_t fileTransactonId, const legacymsg::RtcpFileRqstErrMsgBody &body) - throw(castor::exception::Exception); + ; /** * Processes the specified successful (no embedded error message) RTCP file @@ -778,7 +778,7 @@ protected: void processSuccessfullRtcpRecallFileFinishedRequest( const uint64_t fileTransactonId, const legacymsg::RtcpFileRqstErrMsgBody &body) - throw(castor::exception::Exception); + ; /** * RTCP_TAPEREQ rtcpd message-body handler. @@ -819,7 +819,7 @@ protected: * @param socketFd The socket-descriptor of the connection socket. */ void rtcpEndOfReqRtcpdCallback(const int socketFd) - throw(castor::exception::Exception); + ; /** * TAPEBRIDGE_FLUSHEDTOTAPE tape-bridge message-body handler. @@ -922,7 +922,7 @@ protected: */ void sendFlushedMigrationsToClient( const FileWrittenNotificationList ¬ifications) - throw(castor::exception::Exception); + ; /** * GIVE_OUTP rtcpd message-body handler. @@ -937,7 +937,7 @@ protected: void giveOutpRtcpdCallback( const legacymsg::MessageHeader &header, const int socketFd) - throw(castor::exception::Exception); + ; /** * Starts a migration session. @@ -966,7 +966,7 @@ protected: * @param socketFd The socket file descriptor. */ void checkPeerIsLocalhost(const int socketFd) - throw(castor::exception::Exception); + ; /** * FilesToMigrateList client message handler. @@ -1075,7 +1075,7 @@ protected: void noMoreFilesClientCallback( IObject *const obj, const GetMoreWorkConnection &getMoreWorkConnection) - throw(castor::exception::Exception); + ; /** * Tells the rtcpd daemon that there are no for files to transfer. In the @@ -1095,7 +1095,7 @@ protected: const int rtcpdSock, const uint32_t rtcpdMagic, const uint32_t rtcpdReqType) - throw(castor::exception::Exception); + ; /** * Handles an EndNotificationErrorReport message sent from the client as a @@ -1113,7 +1113,7 @@ protected: void endNotificationErrorReportForGetMoreWorkClientCallback( IObject *const obj, const GetMoreWorkConnection &getMoreWorkConnection) - throw(castor::exception::Exception); + ; /** * Notifies the client of the end of session. @@ -1126,7 +1126,7 @@ protected: * Notifies the rtcpd daemon of the end of session using the initial * rtcpd connection. */ - void notifyRtcpdEndOfSession() throw(castor::exception::Exception); + void notifyRtcpdEndOfSession() ; /** * Notifies the client of any file-specific errors that were received from the @@ -1144,7 +1144,7 @@ protected: */ void notifyClientOfFailedMigrations(const Cuuid_t &cuuid, const std::list<SessionError> &sessionErrors) - throw(castor::exception::Exception); + ; /** * Notifies the client of a failure to recall a file from tape. @@ -1154,7 +1154,7 @@ protected: */ void notifyClientOfFailedRecalls(const Cuuid_t &cuuid, const std::list<SessionError> &sessionErrors) - throw(castor::exception::Exception); + ; /** * Returns true if for any reason the session with the rtcpd daemon is being @@ -1202,7 +1202,7 @@ protected: void generateMigrationTapeFileId( const uint64_t i, char (&dst)[CA_MAXPATHLEN+1]) - const throw(castor::exception::Exception); + const ; /** * Returns the string representation of the specified CASTOR object type. diff --git a/castor/tape/tapebridge/BridgeSocketCatalogue.cpp b/castor/tape/tapebridge/BridgeSocketCatalogue.cpp index 9d4c4783cd9ff7c6f0c8ca9126356f62e460dd9a..0ecf857224db31825e4144bb134db6390977b417 100644 --- a/castor/tape/tapebridge/BridgeSocketCatalogue.cpp +++ b/castor/tape/tapebridge/BridgeSocketCatalogue.cpp @@ -123,7 +123,7 @@ void castor::tape::tapebridge::BridgeSocketCatalogue::addInitialRtcpdConn( // releaseInitialRtcpdConn //----------------------------------------------------------------------------- int castor::tape::tapebridge::BridgeSocketCatalogue::releaseInitialRtcpdConn() - throw(castor::exception::Exception) { + { // Throw an exception if the socket-descriptor has not been set if(0 > m_initialRtcpdSock) { TAPE_THROW_CODE(ENOENT, @@ -171,7 +171,7 @@ void castor::tape::tapebridge::BridgeSocketCatalogue:: // getListenSock //----------------------------------------------------------------------------- int castor::tape::tapebridge::BridgeSocketCatalogue::getListenSock() const - throw(castor::exception::Exception) { + { // Throw an exception if the socket-descriptor of the listen socket does not // exist in the catalogue @@ -188,7 +188,7 @@ int castor::tape::tapebridge::BridgeSocketCatalogue::getListenSock() const // getInitialRtcpdConn //----------------------------------------------------------------------------- int castor::tape::tapebridge::BridgeSocketCatalogue::getInitialRtcpdConn() - const throw(castor::exception::Exception) { + const { // Throw an exception if the socket-descriptor of the initial rtcpd // connection does not exist in the catalogue @@ -383,7 +383,7 @@ int castor::tape::tapebridge::BridgeSocketCatalogue:: // checkForTimeout //----------------------------------------------------------------------------- void castor::tape::tapebridge::BridgeSocketCatalogue::checkForTimeout() const - throw(castor::exception::TimeOut) { + { // If the "get more work" socket-descriptor has already been set if(0 <= m_getMoreWorkConnection.clientSock) { @@ -404,7 +404,7 @@ void castor::tape::tapebridge::BridgeSocketCatalogue::checkForTimeout() const ": ageSecs=" << ageSecs << ": clientNetRWTimeout=" << CLIENTNETRWTIMEOUT; - throw(te); + throw te; } } } @@ -452,7 +452,7 @@ bool castor::tape::tapebridge::BridgeSocketCatalogue:: //----------------------------------------------------------------------------- int castor::tape::tapebridge::BridgeSocketCatalogue:: releaseClientMigrationReportSock(uint64_t &tapebridgeTransId) - throw(castor::exception::Exception) { + { // Throw an exception if the socket-descriptor has not been set if(0 > m_migrationReportConnection.clientSock) { @@ -556,7 +556,7 @@ const castor::tape::tapebridge::GetMoreWorkConnection // releaseGetMoreWorkClientSock //----------------------------------------------------------------------------- int castor::tape::tapebridge::BridgeSocketCatalogue:: - releaseGetMoreWorkClientSock() throw(castor::exception::Exception) { + releaseGetMoreWorkClientSock() { // Throw an exception if the socket-descriptor has not been set if(0 > m_getMoreWorkConnection.clientSock) { diff --git a/castor/tape/tapebridge/BridgeSocketCatalogue.hpp b/castor/tape/tapebridge/BridgeSocketCatalogue.hpp index 3b90a2f72b6e2e5d3804fc251e8c83b5feaad595..7a9a35168559bfd1878c98d2f7b386c2e74d469a 100644 --- a/castor/tape/tapebridge/BridgeSocketCatalogue.hpp +++ b/castor/tape/tapebridge/BridgeSocketCatalogue.hpp @@ -127,7 +127,7 @@ public: * This method throws an exception if the socket-descriptor of the initial * rtpcd-connection is not set. */ - int releaseInitialRtcpdConn() throw(castor::exception::Exception); + int releaseInitialRtcpdConn() ; /** * Adds to the catalogue an rtcpd disk/tape IO control-connection. @@ -153,7 +153,7 @@ public: * This method throws an exception if the socket-descriptor of the listen * socket does not exist in the catalogue. */ - int getListenSock() const throw(castor::exception::Exception); + int getListenSock() const ; /** * Returns the socket-descriptor of the initial rtcpd connection. @@ -161,7 +161,7 @@ public: * This method throws an exception if the socket-descriptor of the initial * rtcpd connection does not exist in the catalogue. */ - int getInitialRtcpdConn() const throw(castor::exception::Exception); + int getInitialRtcpdConn() const ; /** * Releases the specified rtcpd disk/tape IO control-connection from the @@ -281,7 +281,7 @@ public: * client "get more work" connection is not set. */ int releaseGetMoreWorkClientSock() - throw(castor::exception::Exception); + ; /** * Builds the set of file descriptors to be passed to select() to see if any @@ -363,7 +363,7 @@ public: * * This method throws a TimeOut exception if a timeout is found. */ - void checkForTimeout() const throw(castor::exception::TimeOut); + void checkForTimeout() const ; /** * Sets the socket-descriptor of the pending client migration-report @@ -406,7 +406,7 @@ public: * migration-report connection. */ int releaseClientMigrationReportSock(uint64_t &aggregatorTransactionId) - throw(castor::exception::Exception); + ; protected: diff --git a/castor/tape/tapebridge/ClientAddress.hpp b/castor/tape/tapebridge/ClientAddress.hpp index 6291eca65f534439e755a050bb42190859af915a..83a4879524f0783db365184750bbbd6ca1e6f667 100644 --- a/castor/tape/tapebridge/ClientAddress.hpp +++ b/castor/tape/tapebridge/ClientAddress.hpp @@ -58,12 +58,12 @@ public: * address represented by this object is invalid. */ virtual void checkValidity() - const throw(castor::exception::InvalidArgument) = 0; + const = 0; /** * Returns a human-readable description of the client address. */ - const std::string &getDescription() const throw (); + const std::string &getDescription() const throw(); /** * Connects to the client at the address represented by this object. @@ -78,7 +78,7 @@ public: virtual int connectToClient( const int netTimeout, timeval &connectDuration) - const throw(castor::exception::Exception) = 0; + const = 0; private: diff --git a/castor/tape/tapebridge/ClientAddressLocal.cpp b/castor/tape/tapebridge/ClientAddressLocal.cpp index 8fe143537afeb195b092e9a5cb4e672118d21801..51593843e6a7df5e542e034356a3c3986da4df80 100644 --- a/castor/tape/tapebridge/ClientAddressLocal.cpp +++ b/castor/tape/tapebridge/ClientAddressLocal.cpp @@ -68,7 +68,7 @@ castor::tape::tapebridge::ClientAddressLocal::~ClientAddressLocal() throw() { // checkValidity //----------------------------------------------------------------------------- void castor::tape::tapebridge::ClientAddressLocal::checkValidity() - const throw(castor::exception::InvalidArgument) { + const { if(m_filename.empty()) { TAPE_THROW_EX(castor::exception::InvalidArgument, ": Client address is invalid" @@ -83,7 +83,7 @@ void castor::tape::tapebridge::ClientAddressLocal::checkValidity() int castor::tape::tapebridge::ClientAddressLocal::connectToClient( const int netTimeout, timeval &connectDuration) - const throw(castor::exception::Exception) { + const { struct sockaddr_un address; const socklen_t address_len = sizeof(address); diff --git a/castor/tape/tapebridge/ClientAddressLocal.hpp b/castor/tape/tapebridge/ClientAddressLocal.hpp index 9584b8884d57a066b7e647cfa2b2d8af2c8cbf14..5de8392de9d227146769bc3b66e35248619b5cd9 100644 --- a/castor/tape/tapebridge/ClientAddressLocal.hpp +++ b/castor/tape/tapebridge/ClientAddressLocal.hpp @@ -54,7 +54,7 @@ public: * Throws a castor::exception::InvalidArgument exception if the client * address represented by this object is invalid. */ - void checkValidity() const throw(castor::exception::InvalidArgument); + void checkValidity() const ; /** * Connects to the client at the address represented by this object. @@ -69,7 +69,7 @@ public: int connectToClient( const int netTimeout, timeval &connectDuration) - const throw(castor::exception::Exception); + const ; /** * Returns the filename of the local-domain address. diff --git a/castor/tape/tapebridge/ClientAddressTcpIp.cpp b/castor/tape/tapebridge/ClientAddressTcpIp.cpp index a41a71ae973e449ebdf5769e1448751d2c7b398e..abe8f7bfe8f383b04b9fdaf56f68181e6bc29b03 100644 --- a/castor/tape/tapebridge/ClientAddressTcpIp.cpp +++ b/castor/tape/tapebridge/ClientAddressTcpIp.cpp @@ -68,7 +68,7 @@ castor::tape::tapebridge::ClientAddressTcpIp::~ClientAddressTcpIp() throw() { // checkValidity //----------------------------------------------------------------------------- void castor::tape::tapebridge::ClientAddressTcpIp::checkValidity() - const throw(castor::exception::InvalidArgument) { + const { if(getHostname().empty()) { TAPE_THROW_EX(castor::exception::InvalidArgument, ": Client address is invalid" @@ -89,7 +89,7 @@ void castor::tape::tapebridge::ClientAddressTcpIp::checkValidity() int castor::tape::tapebridge::ClientAddressTcpIp::connectToClient( const int netTimeout, timeval &connectDuration) - const throw(castor::exception::Exception) { + const { castor::io::ClientSocket sock(getPort(), getHostname()); sock.setTimeout(netTimeout); try { @@ -133,6 +133,6 @@ const std::string &castor::tape::tapebridge::ClientAddressTcpIp::getHostname() // getPort //----------------------------------------------------------------------------- uint32_t castor::tape::tapebridge::ClientAddressTcpIp::getPort() - const throw () { + const throw() { return m_port; } diff --git a/castor/tape/tapebridge/ClientAddressTcpIp.hpp b/castor/tape/tapebridge/ClientAddressTcpIp.hpp index fd91ada759944ff0ebe6609afaa81411c5bb0ebb..c64e4bca3ed69cf75fb25a820db7d250cde32da2 100644 --- a/castor/tape/tapebridge/ClientAddressTcpIp.hpp +++ b/castor/tape/tapebridge/ClientAddressTcpIp.hpp @@ -58,7 +58,7 @@ public: * Throws a castor::exception::InvalidArgument exception if the client * address represented by this object is invalid. */ - void checkValidity() const throw(castor::exception::InvalidArgument); + void checkValidity() const ; /** * Connects to the client at the address represented by this object. @@ -73,7 +73,7 @@ public: int connectToClient( const int netTimeout, timeval &connectDuration) - const throw(castor::exception::Exception); + const ; /** * Returns the hostname of the TCP/IP address. diff --git a/castor/tape/tapebridge/ClientProxy.cpp b/castor/tape/tapebridge/ClientProxy.cpp index c6b4dd59a35d5f1db1033964e0ae63424ec780de..9f5c74a7ec2d94ae3395e98fa29bb273ec11bfc1 100644 --- a/castor/tape/tapebridge/ClientProxy.cpp +++ b/castor/tape/tapebridge/ClientProxy.cpp @@ -58,7 +58,7 @@ castor::tape::tapebridge::ClientProxy::ClientProxy( const ClientAddress &clientAddress, const std::string &dgn, const std::string &driveUnit) - throw(castor::exception::InvalidArgument): + : m_cuuid(cuuid), m_mountTransactionId(mountTransactionId), m_netTimeout(netTimeout), @@ -120,7 +120,7 @@ castor::tape::tapebridge::ClientProxy::~ClientProxy() throw() { castor::tape::tapegateway::Volume *castor::tape::tapebridge::ClientProxy::getVolume( const uint64_t tapebridgeTransId) - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -238,7 +238,7 @@ int castor::tape::tapebridge::ClientProxy::sendFilesToMigrateListRequest( const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception) { + { // Check method arguments if(maxFiles == 0) { @@ -304,7 +304,7 @@ castor::tape::tapegateway::FilesToMigrateList receiveFilesToMigrateListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) { + { const char *const task = "receive reply to FilesToMigrateListRequest and" " close connection"; @@ -403,7 +403,7 @@ int castor::tape::tapebridge::ClientProxy::sendFilesToRecallListRequest( const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception) { + { // Check method arguments if(maxFiles == 0) { @@ -443,7 +443,7 @@ castor::tape::tapegateway::FilesToRecallList receiveFilesToRecallListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) { + { const char *const task = "receive reply to FilesToRecallListRequest and" " close connection"; @@ -534,7 +534,7 @@ castor::tape::tapegateway::FilesToRecallList castor::tape::tapegateway::DumpParameters *castor::tape::tapebridge::ClientProxy::getDumpParameters( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -613,7 +613,7 @@ castor::tape::tapegateway::DumpParameters void castor::tape::tapebridge::ClientProxy::notifyDumpMessage( const uint64_t tapebridgeTransId, const char (&message)[CA_MAXLINELEN+1]) const - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -657,7 +657,7 @@ void castor::tape::tapebridge::ClientProxy::notifyDumpMessage( //----------------------------------------------------------------------------- void castor::tape::tapebridge::ClientProxy::ping( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -699,7 +699,7 @@ void castor::tape::tapebridge::ClientProxy::ping( int castor::tape::tapebridge::ClientProxy::connectAndSendMessage( IObject &message, timeval &connectDuration) const - throw(castor::exception::Exception) { + { castor::io::ClientSocket sock(m_clientAddress.connectToClient(m_netTimeout, connectDuration)); @@ -733,7 +733,7 @@ int castor::tape::tapebridge::ClientProxy::connectAndSendMessage( //----------------------------------------------------------------------------- castor::IObject *castor::tape::tapebridge::ClientProxy::receiveReplyAndClose( const int clientSock) const - throw(castor::exception::Exception) { + { // Receive the reply object castor::io::AbstractTCPSocket sock(clientSock); @@ -779,7 +779,7 @@ castor::IObject IObject &request, timeval &connectDuration, timeval &sendRecvDuration) const - throw(castor::exception::Exception) { + { castor::io::ClientSocket sock(m_clientAddress.connectToClient(m_netTimeout, connectDuration)); @@ -842,7 +842,7 @@ castor::IObject void castor::tape::tapebridge::ClientProxy::receiveNotificationReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) { + { const char *const task = "receive notification reply and close connection"; @@ -905,7 +905,7 @@ void castor::tape::tapebridge::ClientProxy::notifyClient( const uint64_t tapebridgeTransId, const char *const requestTypeName, IObject& request) const - throw(castor::exception::Exception) { + { // Send the request and receive the reply timeval connectDuration = {0, 0}; @@ -953,7 +953,7 @@ void castor::tape::tapebridge::ClientProxy::notifyClient( //----------------------------------------------------------------------------- void castor::tape::tapebridge::ClientProxy::throwEndNotificationErrorReport( IObject *const obj) const - throw(castor::exception::Exception) { + { // Down cast the reply to its specific class tapegateway::EndNotificationErrorReport *reply = @@ -980,7 +980,7 @@ void castor::tape::tapebridge::ClientProxy::checkTransactionIds( const uint32_t actualMountTransactionId, const uint64_t expectedTapebridgeTransId, const uint64_t actualTapebridgeTransId) const - throw(castor::exception::Exception) { + { int nbErrors = 0; std::stringstream errorMessage; @@ -1014,7 +1014,7 @@ void castor::tape::tapebridge::ClientProxy::checkTransactionIds( //----------------------------------------------------------------------------- void castor::tape::tapebridge::ClientProxy::notifyEndOfSession( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -1057,7 +1057,7 @@ void castor::tape::tapebridge::ClientProxy::notifyEndOfFailedSession( const uint64_t tapebridgeTransId, const int errorCode, const std::string &errorMessage) const - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { diff --git a/castor/tape/tapebridge/ClientProxy.hpp b/castor/tape/tapebridge/ClientProxy.hpp index 95f8c861119de12d63ef62d8eb3c1007dfcf6e6a..90505d65b3725a03aee38fb88267762609ef628b 100644 --- a/castor/tape/tapebridge/ClientProxy.hpp +++ b/castor/tape/tapebridge/ClientProxy.hpp @@ -83,7 +83,7 @@ public: const ClientAddress &clientAddress, const std::string &dgn, const std::string &driveUnit) - throw(castor::exception::InvalidArgument); + ; /** * Destructor. @@ -102,7 +102,7 @@ public: */ tapegateway::Volume *getVolume( const uint64_t tapebridgeTransId) - throw(castor::exception::Exception); + ; /** * Sends a FilesToMigrateListRequest to the client and returns the @@ -123,7 +123,7 @@ public: const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception); + ; /** * Receives the reply to a FilesToMigrateListRequest from the specified @@ -145,7 +145,7 @@ public: *receiveFilesToMigrateListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception); + ; /** * Sends a FilesToRecallListRequest to the client and returns the @@ -169,7 +169,7 @@ public: const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception); + ; /** * Receives the reply to a FilesToRecallListRequest from the specified client @@ -191,7 +191,7 @@ public: *receiveFilesToRecallListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception); + ; /** * Receives the reply to a FileMigrationReportList or a FileRecallReportList @@ -204,7 +204,7 @@ public: void receiveNotificationReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception); + ; /** * Gets the parameters to be used when dumping a tape. @@ -217,7 +217,7 @@ public: */ tapegateway::DumpParameters *getDumpParameters( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception); + ; /** * Notifies the client of a dump tape message string. @@ -229,7 +229,7 @@ public: void notifyDumpMessage( const uint64_t tapebridgeTransId, const char (&message)[CA_MAXLINELEN+1]) const - throw(castor::exception::Exception); + ; /** * Pings the client and throws an exception if the ping has failed. @@ -239,7 +239,7 @@ public: */ void ping( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception); + ; /** * Receives a reply from the specified client socket and then closes the @@ -251,7 +251,7 @@ public: * object. */ IObject *receiveReplyAndClose(const int clientSock) const - throw(castor::exception::Exception); + ; /** * Throws an exception if there is a mount transaction ID mismatch and/or @@ -267,7 +267,7 @@ public: const uint32_t actualMountTransactionId, const uint64_t expectedTapebridgeTransId, const uint64_t actualTapebridgeTransId) const - throw(castor::exception::Exception); + ; /** * Notifies the client of the end of the recall/migration session. @@ -277,7 +277,7 @@ public: */ void notifyEndOfSession( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception); + ; /** * Notifies the client of the end of the recall/migration session due to an @@ -292,7 +292,7 @@ public: const uint64_t tapebridgeTransId, const int errorCode, const std::string &errorMessage) const - throw(castor::exception::Exception); + ; /** * Connects to the client and sends the specified message to the client. @@ -310,7 +310,7 @@ public: int connectAndSendMessage( IObject &message, timeval &connectDuration) const - throw(castor::exception::Exception); + ; protected: @@ -335,7 +335,7 @@ protected: IObject &request, timeval &connectDuration, timeval &sendRecvDuration) const - throw(castor::exception::Exception); + ; /** * Notifies the client using the specified request message. @@ -351,7 +351,7 @@ protected: const uint64_t tapebridgeTransId, const char *const requestTypeName, IObject &request) const - throw(castor::exception::Exception); + ; /** * Translates the specified incoming EndNotificationErrorReport message into @@ -363,7 +363,7 @@ protected: * OBJ_EndNotificationErrorReport message. */ void throwEndNotificationErrorReport(IObject *const obj) const - throw(castor::exception::Exception); + ; /** * The cuuid to be used for logging. diff --git a/castor/tape/tapebridge/ConfigParam.hpp b/castor/tape/tapebridge/ConfigParam.hpp index cb87acd8025c879a0ba575a2c10bb8ea6cb60cdc..d9d7b2254129d8849a0b9e7db84f747b364d3638 100644 --- a/castor/tape/tapebridge/ConfigParam.hpp +++ b/castor/tape/tapebridge/ConfigParam.hpp @@ -96,7 +96,7 @@ public: * This method throws a castor::exception::NoValue exception if the value * and source of the configuration parameter have not been set. */ - ValueType getValue() const throw(castor::exception::NoValue) { + ValueType getValue() const { if(!valueAndSourceAreSet()) { TAPE_THROW_EX(castor::exception::NoValue, ": Value and source of configuation parameter have not been set" @@ -112,7 +112,7 @@ public: * and source of the configuration parameter have not been set. */ ConfigParamSource::Enum getSource() const - throw(castor::exception::NoValue) { + { if(!valueAndSourceAreSet()) { TAPE_THROW_EX(castor::exception::NoValue, ": Value and source of configuation parameter have not been set" diff --git a/castor/tape/tapebridge/IClientProxy.hpp b/castor/tape/tapebridge/IClientProxy.hpp index a9f623f757755aad2af90a059b5309390eac3a81..95ae90874b31766c16f4ee5c6018787e23109b38 100644 --- a/castor/tape/tapebridge/IClientProxy.hpp +++ b/castor/tape/tapebridge/IClientProxy.hpp @@ -75,7 +75,7 @@ public: */ virtual tapegateway::Volume *getVolume( const uint64_t tapebridgeTransId) - throw(castor::exception::Exception) = 0; + = 0; /** * Sends a FilesToMigrateListRequest to the client and returns the @@ -96,7 +96,7 @@ public: const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception) = 0; + = 0; /** * Receives the reply to a FilesToMigrateListRequest from the specified @@ -118,7 +118,7 @@ public: *receiveFilesToMigrateListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) = 0; + = 0; /** * Sends a FilesToRecallListRequest to the client and returns the @@ -142,7 +142,7 @@ public: const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception) = 0; + = 0; /** * Receives the reply to a FilesToRecallListRequest from the specified client @@ -164,7 +164,7 @@ public: *receiveFilesToRecallListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) = 0; + = 0; /** * Receives the reply to a FileMigrationReportList or a FileRecallReportList @@ -177,7 +177,7 @@ public: virtual void receiveNotificationReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) = 0; + = 0; /** * Gets the parameters to be used when dumping a tape. @@ -190,7 +190,7 @@ public: */ virtual tapegateway::DumpParameters *getDumpParameters( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the client of a dump tape message string. @@ -202,7 +202,7 @@ public: virtual void notifyDumpMessage( const uint64_t tapebridgeTransId, const char (&message)[CA_MAXLINELEN+1]) const - throw(castor::exception::Exception) = 0; + = 0; /** * Pings the client and throws an exception if the ping has failed. @@ -212,7 +212,7 @@ public: */ virtual void ping( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) = 0; + = 0; /** * Receives a reply from the specified client socket and then closes the @@ -224,7 +224,7 @@ public: * object. */ virtual IObject *receiveReplyAndClose(const int clientSock) const - throw(castor::exception::Exception) = 0; + = 0; /** * Throws an exception if there is a mount transaction ID mismatch and/or @@ -240,7 +240,7 @@ public: const uint32_t actualMountTransactionId, const uint64_t expectedTapebridgeTransId, const uint64_t actualTapebridgeTransId) const - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the client of the end of the recall/migration session. @@ -250,7 +250,7 @@ public: */ virtual void notifyEndOfSession( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) = 0; + = 0; /** * Notifies the client of the end of the recall/migration session due to an @@ -265,7 +265,7 @@ public: const uint64_t tapebridgeTransId, const int errorCode, const std::string &errorMessage) const - throw(castor::exception::Exception) = 0; + = 0; /** * Connects to the client and sends the specified message to the client. @@ -283,7 +283,7 @@ public: virtual int connectAndSendMessage( IObject &message, timeval &connectDuration) const - throw(castor::exception::Exception) = 0; + = 0; }; // class IClientProxy diff --git a/castor/tape/tapebridge/ILegacyTxRx.hpp b/castor/tape/tapebridge/ILegacyTxRx.hpp index 3f37d497dc7481f9a50de62a68692da56c2ebfd3..d11d78bda81b284128bd296a86d3fc1fbe1bfa0f 100644 --- a/castor/tape/tapebridge/ILegacyTxRx.hpp +++ b/castor/tape/tapebridge/ILegacyTxRx.hpp @@ -54,7 +54,7 @@ public: virtual void sendMsgHeader( const int socketFd, const legacymsg::MessageHeader &header) - throw(castor::exception::Exception) = 0; + = 0; /** * Receives a message header. @@ -74,7 +74,7 @@ public: virtual void receiveMsgHeader( const int socketFd, legacymsg::MessageHeader &header) - throw(castor::exception::Exception) = 0; + = 0; /** * Receives a message header or a connection close message. @@ -87,7 +87,7 @@ public: virtual bool receiveMsgHeaderFromCloseable( const int socketFd, legacymsg::MessageHeader &header) - throw(castor::exception::Exception) = 0; + = 0; }; // class LegacyTxRx diff --git a/castor/tape/tapebridge/LegacyTxRx.cpp b/castor/tape/tapebridge/LegacyTxRx.cpp index 8738667e70ced7bfa977587eb1cccb275f437cc0..7faa20c596d59d5246351b1a67d1c88f71b996c8 100644 --- a/castor/tape/tapebridge/LegacyTxRx.cpp +++ b/castor/tape/tapebridge/LegacyTxRx.cpp @@ -68,7 +68,7 @@ int castor::tape::tapebridge::LegacyTxRx::getNetReadWriteTimeout() const void castor::tape::tapebridge::LegacyTxRx::sendMsgHeader( const int socketFd, const legacymsg::MessageHeader &header) - throw(castor::exception::Exception) { + { char buf[RTCPMSGBUFSIZE]; size_t totalLen = 0; @@ -97,7 +97,7 @@ void castor::tape::tapebridge::LegacyTxRx::sendMsgHeader( void castor::tape::tapebridge::LegacyTxRx::receiveMsgHeader( const int socketFd, legacymsg::MessageHeader &header) - throw(castor::exception::Exception) { + { // Read in the message header char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len @@ -128,7 +128,7 @@ void castor::tape::tapebridge::LegacyTxRx::receiveMsgHeader( //----------------------------------------------------------------------------- bool castor::tape::tapebridge::LegacyTxRx::receiveMsgHeaderFromCloseable( const int socketFd, - legacymsg::MessageHeader &header) throw(castor::exception::Exception) { + legacymsg::MessageHeader &header) { bool connClosed = false; diff --git a/castor/tape/tapebridge/LegacyTxRx.hpp b/castor/tape/tapebridge/LegacyTxRx.hpp index 82ae7389c0092156af301c07f372901725150bff..b60d7e2f094dc6b1924defe5441f95d2cf0c1678 100644 --- a/castor/tape/tapebridge/LegacyTxRx.hpp +++ b/castor/tape/tapebridge/LegacyTxRx.hpp @@ -69,7 +69,7 @@ public: void sendMsgHeader( const int socketFd, const legacymsg::MessageHeader &header) - throw(castor::exception::Exception); + ; /** * Receives a message header. @@ -89,7 +89,7 @@ public: void receiveMsgHeader( const int socketFd, legacymsg::MessageHeader &header) - throw(castor::exception::Exception); + ; /** * Receives a message header or a connection close message. @@ -102,7 +102,7 @@ public: bool receiveMsgHeaderFromCloseable( const int socketFd, legacymsg::MessageHeader &header) - throw(castor::exception::Exception); + ; private: diff --git a/castor/tape/tapebridge/PendingMigrationsStore.cpp b/castor/tape/tapebridge/PendingMigrationsStore.cpp index a4e6fddcc75ae49ed2ede51d617c98643eec79ed..ab0d3317ec51c037cea0f7a6033fe85c30d9f1cb 100644 --- a/castor/tape/tapebridge/PendingMigrationsStore.cpp +++ b/castor/tape/tapebridge/PendingMigrationsStore.cpp @@ -60,7 +60,7 @@ void castor::tape::tapebridge::PendingMigrationsStore:: //------------------------------------------------------------------------------ void castor::tape::tapebridge::PendingMigrationsStore:: checkRequestToMigrateFile(const RequestToMigrateFile &request) - throw(SessionException) { + { // Throw an exception if the tape-file sequence-number of the request is zero if(0 == request.tapeFSeq) { SessionError sError; @@ -130,7 +130,7 @@ void castor::tape::tapebridge::PendingMigrationsStore:: // noMoreFilesToMigrate //------------------------------------------------------------------------------ void castor::tape::tapebridge::PendingMigrationsStore::noMoreFilesToMigrate() - throw(castor::exception::Exception) { + { const bool endOfSessionFileIsKnown = 0 != m_tapeFSeqOfEndOfSessionFile; if(endOfSessionFileIsKnown) { @@ -148,7 +148,7 @@ void castor::tape::tapebridge::PendingMigrationsStore::noMoreFilesToMigrate() //------------------------------------------------------------------------------ void castor::tape::tapebridge::PendingMigrationsStore::fileWrittenWithoutFlush( const FileWrittenNotification ¬ification) - throw(castor::exception::Exception) { + { const char *const task = "mark file-migration as written without flush"; @@ -263,7 +263,7 @@ void castor::tape::tapebridge::PendingMigrationsStore::fileWrittenWithoutFlush( void castor::tape::tapebridge::PendingMigrationsStore::checkForMismatches( const RequestToMigrateFile &request, const FileWrittenNotification ¬ification) - const throw(castor::exception::Exception) { + const { bool foundMismatch = false; std::ostringstream oss; @@ -327,7 +327,7 @@ void castor::tape::tapebridge::PendingMigrationsStore::checkForMismatches( //------------------------------------------------------------------------------ castor::tape::tapebridge::FileWrittenNotificationList castor::tape::tapebridge::PendingMigrationsStore::dataFlushedToTape( - const int32_t tapeFSeqOfFlush) throw(castor::exception::Exception) { + const int32_t tapeFSeqOfFlush) { const char *const methodTask = "accept flush to tape"; FileWrittenNotificationList outputList; @@ -423,7 +423,7 @@ void castor::tape::tapebridge::PendingMigrationsStore::clear() { // getMaxBytesBeforeFlush //------------------------------------------------------------------------------ uint64_t castor::tape::tapebridge::PendingMigrationsStore:: - getMaxBytesBeforeFlush() const throw(castor::exception::Exception) { + getMaxBytesBeforeFlush() const { if(TAPEBRIDGE_ONE_FLUSH_PER_N_FILES == m_tapeFlushConfigParams.getTapeFlushMode().getValue()) { return m_tapeFlushConfigParams.getMaxBytesBeforeFlush().getValue(); @@ -436,7 +436,7 @@ uint64_t castor::tape::tapebridge::PendingMigrationsStore:: // getMaxFilesBeforeFlush //------------------------------------------------------------------------------ uint64_t castor::tape::tapebridge::PendingMigrationsStore:: - getMaxFilesBeforeFlush() const throw(castor::exception::Exception) { + getMaxFilesBeforeFlush() const { if(TAPEBRIDGE_ONE_FLUSH_PER_N_FILES == m_tapeFlushConfigParams.getTapeFlushMode().getValue()) { return m_tapeFlushConfigParams.getMaxFilesBeforeFlush().getValue(); diff --git a/castor/tape/tapebridge/PendingMigrationsStore.hpp b/castor/tape/tapebridge/PendingMigrationsStore.hpp index 526790fefc27bab637ea228d970218df42e4c47e..9c20104fb01c9ec90c84e73ded8d137f9fc1e5c7 100644 --- a/castor/tape/tapebridge/PendingMigrationsStore.hpp +++ b/castor/tape/tapebridge/PendingMigrationsStore.hpp @@ -87,7 +87,7 @@ public: * the file has been flushed to tape. */ void fileWrittenWithoutFlush(const FileWrittenNotification ¬ification) - throw(castor::exception::Exception); + ; /** * To be called when there are no more files to be migrated. @@ -97,7 +97,7 @@ public: * written to tape. The pending-migrations store uses this knowledge to * check the validity of the tape-file sequence-number of flushes to tape. */ - void noMoreFilesToMigrate() throw(castor::exception::Exception); + void noMoreFilesToMigrate() ; /** * Removes the pending file-migrations that have a tape-file sequence-number @@ -114,7 +114,7 @@ public: * flush. */ FileWrittenNotificationList dataFlushedToTape( - const int32_t tapeFSeqOfFlush) throw(castor::exception::Exception); + const int32_t tapeFSeqOfFlush) ; /** * Returns the total number of pending file-migrations currently inside the @@ -314,7 +314,7 @@ private: */ void checkForMismatches(const RequestToMigrateFile &request, const FileWrittenNotification ¬ification) - const throw(castor::exception::Exception); + const ; /** * Clears all of the pending migrations from this store. @@ -325,20 +325,20 @@ private: * Returns the maximum number of bytes before the tape drive buffer should * be flushed. */ - uint64_t getMaxBytesBeforeFlush() const throw(castor::exception::Exception); + uint64_t getMaxBytesBeforeFlush() const ; /** * Returns the maximum number of files before the tape drive buffer should * be flushed. */ - uint64_t getMaxFilesBeforeFlush() const throw(castor::exception::Exception); + uint64_t getMaxFilesBeforeFlush() const ; /** * This method throws a SessionException of FILE_SCOPE if the specified * request to migrate a file is invalid. */ void checkRequestToMigrateFile(const RequestToMigrateFile &request) - throw(SessionException); + ; }; // class PendingMigrationsStore diff --git a/castor/tape/tapebridge/RtcpJobSubmitter.cpp b/castor/tape/tapebridge/RtcpJobSubmitter.cpp index 850d85527c4ab99b849ed2b0722b4faa32422b9e..b2c1a2cbc4da91fb108ac0b6ba73f3d0558bad8a 100644 --- a/castor/tape/tapebridge/RtcpJobSubmitter.cpp +++ b/castor/tape/tapebridge/RtcpJobSubmitter.cpp @@ -58,7 +58,7 @@ void castor::tape::tapebridge::RtcpJobSubmitter::submit( const std::string &dgn, const std::string &driveUnit, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception) { + { legacymsg::RtcpJobRqstMsgBody request; @@ -151,7 +151,7 @@ void castor::tape::tapebridge::RtcpJobSubmitter::readReply( const int netReadWriteTimeout, const char *remoteCopyType, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception) { + { // Read in the message header char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len diff --git a/castor/tape/tapebridge/RtcpJobSubmitter.hpp b/castor/tape/tapebridge/RtcpJobSubmitter.hpp index 0e0466b6a0901ad0800b1915f6a3690e0e2fed9f..19e6f9a7de2cd1f4d0cd500cabe745ac60a44989 100644 --- a/castor/tape/tapebridge/RtcpJobSubmitter.hpp +++ b/castor/tape/tapebridge/RtcpJobSubmitter.hpp @@ -83,7 +83,7 @@ namespace tapebridge { const std::string &dgn, const std::string &driveUnit, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception); + ; private: @@ -104,7 +104,7 @@ namespace tapebridge { const int netReadWriteTimeout, const char *remoteCopyType, legacymsg::RtcpJobReplyMsgBody &reply) - throw(castor::exception::Exception); + ; }; // class RtcpJobSubmitter diff --git a/castor/tape/tapebridge/RtcpTxRx.cpp b/castor/tape/tapebridge/RtcpTxRx.cpp index ec4ab3a39a4b80f596d8a16dd6aa36940e522cfb..24004b7f772ab59325f171ff2c92cf3cccb295ea 100644 --- a/castor/tape/tapebridge/RtcpTxRx.cpp +++ b/castor/tape/tapebridge/RtcpTxRx.cpp @@ -49,7 +49,7 @@ void castor::tape::tapebridge::RtcpTxRx::getRequestInfoFromRtcpd( const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpTapeRqstErrMsgBody &reply) - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -137,7 +137,7 @@ void castor::tape::tapebridge::RtcpTxRx::getRequestInfoFromRtcpd( void castor::tape::tapebridge::RtcpTxRx::giveVolumeToRtcpd( const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpTapeRqstErrMsgBody &request) - throw(castor::exception::Exception) { + { LogHelper::logMsgBody(cuuid, DLF_LVL_DEBUG, TAPEBRIDGE_GIVE_VOLUME_TO_RTCPD, volReqId, socketFd, request); @@ -195,7 +195,7 @@ void castor::tape::tapebridge::RtcpTxRx::giveFileToRtcpd( const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, const uint32_t mode, legacymsg::RtcpFileRqstErrMsgBody &request) - throw(castor::exception::Exception) { + { { const int message_no = mode == WRITE_ENABLE ? @@ -264,7 +264,7 @@ void castor::tape::tapebridge::RtcpTxRx::giveFileToRtcpd( void castor::tape::tapebridge::RtcpTxRx::tellRtcpdDumpTape( const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpDumpTapeRqstMsgBody &request) - throw(castor::exception::Exception) { + { LogHelper::logMsgBody(cuuid, DLF_LVL_DEBUG, TAPEBRIDGE_TELL_RTCPD_DUMP_TAPE, volReqId, socketFd, request); @@ -323,7 +323,7 @@ void castor::tape::tapebridge::RtcpTxRx::tellRtcpdDumpTape( //----------------------------------------------------------------------------- void castor::tape::tapebridge::RtcpTxRx::pingRtcpd(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout) - throw(castor::exception::Exception) { + { char buf[RTCPMSGBUFSIZE]; size_t totalLen = 0; @@ -375,7 +375,7 @@ void castor::tape::tapebridge::RtcpTxRx::pingRtcpd(const Cuuid_t &cuuid, //----------------------------------------------------------------------------- void castor::tape::tapebridge::RtcpTxRx::tellRtcpdEndOfFileList( const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, - const int netReadWriteTimeout) throw(castor::exception::Exception) { + const int netReadWriteTimeout) { { castor::dlf::Param params[] = { @@ -470,7 +470,7 @@ void castor::tape::tapebridge::RtcpTxRx::tellRtcpdEndOfFileList( //----------------------------------------------------------------------------- void castor::tape::tapebridge::RtcpTxRx::receiveRtcpJobRqst(const Cuuid_t &cuuid, const int socketFd, const int, - legacymsg::RtcpJobRqstMsgBody &request) throw(castor::exception::Exception) { + legacymsg::RtcpJobRqstMsgBody &request) { castor::dlf::dlf_writep(cuuid, DLF_LVL_DEBUG, TAPEBRIDGE_RECEIVE_RTCOPY_JOB); @@ -555,7 +555,7 @@ void castor::tape::tapebridge::RtcpTxRx::askRtcpdToRequestMoreWork( const Cuuid_t &cuuid, const uint32_t volReqId, const char *const tapePath, const int socketFd, const int netReadWriteTimeout, const uint32_t mode) - throw(castor::exception::Exception) { + { { castor::dlf::Param params[] = { @@ -659,7 +659,7 @@ void castor::tape::tapebridge::RtcpTxRx::giveFileToRtcpd( const char *const tapeFileId, const uint32_t umask, const int32_t positionMethod, const int32_t tapeFseq, const int32_t diskFseq, char (&nameServerHostName)[CA_MAXHOSTNAMELEN+1], const uint64_t castorFileId, - unsigned char (&blockId)[4]) throw(castor::exception::Exception) { + unsigned char (&blockId)[4]) { legacymsg::RtcpFileRqstErrMsgBody msgBody; @@ -709,7 +709,7 @@ void castor::tape::tapebridge::RtcpTxRx::giveFileToRtcpd( //----------------------------------------------------------------------------- void castor::tape::tapebridge::RtcpTxRx::checkMagic(const uint32_t expected, const uint32_t actual, const char*) - throw(castor::exception::Exception) { + { if(expected != actual) { TAPE_THROW_CODE(EBADMSG, @@ -727,7 +727,7 @@ void castor::tape::tapebridge::RtcpTxRx::checkMagic(const uint32_t expected, //----------------------------------------------------------------------------- void castor::tape::tapebridge::RtcpTxRx::checkRtcopyReqType( const uint32_t expected, const uint32_t actual, const char *function) - throw(castor::exception::Exception) { + { checkRtcopyReqType(&expected, 1, actual, function); } @@ -738,7 +738,7 @@ void castor::tape::tapebridge::RtcpTxRx::checkRtcopyReqType( //----------------------------------------------------------------------------- void castor::tape::tapebridge::RtcpTxRx::checkRtcopyReqType( const uint32_t *expected, const size_t nbExpected, const uint32_t actual, - const char*) throw(castor::exception::Exception) { + const char*) { size_t i = 0; diff --git a/castor/tape/tapebridge/RtcpTxRx.hpp b/castor/tape/tapebridge/RtcpTxRx.hpp index 3f404911a349e95b4e2de8b031d87582b0c54442..58a1d8964682a072929f42e01c66a9c6b1b593bc 100644 --- a/castor/tape/tapebridge/RtcpTxRx.hpp +++ b/castor/tape/tapebridge/RtcpTxRx.hpp @@ -69,7 +69,7 @@ public: static void getRequestInfoFromRtcpd(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpTapeRqstErrMsgBody &reply) - throw(castor::exception::Exception); + ; /** * Gives information about a volume to RTCPD by sending and receiving the @@ -87,7 +87,7 @@ public: static void giveVolumeToRtcpd(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpTapeRqstErrMsgBody &request) - throw(castor::exception::Exception); + ; /** * Pings RTCPD using the specified socket. @@ -100,7 +100,7 @@ public: */ static void pingRtcpd(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout) - throw(castor::exception::Exception); + ; /** * Receives an RTCP job submission message. @@ -115,7 +115,7 @@ public: */ static void receiveRtcpJobRqst(const Cuuid_t &cuuid, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpJobRqstMsgBody &request) - throw(castor::exception::Exception); + ; /** * Asks RTCPD to request more work in the future. @@ -135,7 +135,7 @@ public: static void askRtcpdToRequestMoreWork(const Cuuid_t &cuuid, const uint32_t volReqId, const char *const tapePath, const int socketFd, const int netReadWriteTimeout, const uint32_t mode) - throw(castor::exception::Exception); + ; /** * Gives the specified file list of one and only one actual file description @@ -168,7 +168,7 @@ public: const int32_t positionMethod, const int32_t tapeFseq, const int32_t diskFseq, char (&nameServerHostName)[CA_MAXHOSTNAMELEN+1], const uint64_t castorFileId, unsigned char (&blockId)[4]) - throw(castor::exception::Exception); + ; /** @@ -184,7 +184,7 @@ public: static void tellRtcpdDumpTape(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, legacymsg::RtcpDumpTapeRqstMsgBody &request) - throw(castor::exception::Exception); + ; /** * Receives a message body from RTCPD. @@ -204,7 +204,7 @@ public: const int socketFd, const int, const legacymsg::MessageHeader &header, - T &body) throw(castor::exception::Exception) { + T &body) { // Length of body buffer = Length of message buffer - length of header char bodyBuf[RTCPMSGBUFSIZE - 3 * sizeof(uint32_t)]; @@ -261,7 +261,7 @@ public: */ static void tellRtcpdEndOfFileList(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout) - throw(castor::exception::Exception); + ; private: @@ -286,7 +286,7 @@ private: static void giveFileToRtcpd(const Cuuid_t &cuuid, const uint32_t volReqId, const int socketFd, const int netReadWriteTimeout, const uint32_t mode, legacymsg::RtcpFileRqstErrMsgBody &request) - throw(castor::exception::Exception); + ; /** * Throws an exception if the expected magic number is not equal to the @@ -297,7 +297,7 @@ private: * @param function The name of the caller function. */ static void checkMagic(const uint32_t expected, const uint32_t actual, - const char *function) throw(castor::exception::Exception); + const char *function) ; /** * Throws an exception if the expected RTCOPY_MAGIC request type is not equal @@ -309,7 +309,7 @@ private: */ static void checkRtcopyReqType(const uint32_t expected, const uint32_t actual, const char *function) - throw(castor::exception::Exception); + ; /** * Throws an exception if one of the expected RTCOPY_MAGIC request types is @@ -322,7 +322,7 @@ private: */ static void checkRtcopyReqType(const uint32_t *expected, const size_t nbExpected, const uint32_t actual, const char *function) - throw(castor::exception::Exception); + ; /** * Throws an exception if one of the expected RTCOPY_MAGIC request types is @@ -334,7 +334,7 @@ private: */ template <size_t n> static void checkRtcopyReqType( const uint32_t (&expected)[n], const uint32_t actual, const char *function) - throw(castor::exception::Exception) { + { checkRtcopyReqType(expected, n, actual, function); } diff --git a/castor/tape/tapebridge/TapeBridgeDaemon.cpp b/castor/tape/tapebridge/TapeBridgeDaemon.cpp index bf1bd885d4eeab240d681449d75b1d836c65a059..be49b060c82e4255d53a93e9d3643519b03580fd 100644 --- a/castor/tape/tapebridge/TapeBridgeDaemon.cpp +++ b/castor/tape/tapebridge/TapeBridgeDaemon.cpp @@ -46,7 +46,7 @@ //------------------------------------------------------------------------------ castor::tape::tapebridge::TapeBridgeDaemon::TapeBridgeDaemon( std::ostream &stdOut, std::ostream &stdErr, log::Logger &log) - throw(castor::exception::Exception) : + : castor::server::MultiThreadedDaemon(stdOut, stdErr, log), m_vdqmRequestHandlerThreadPool(0) { } @@ -109,7 +109,7 @@ int castor::tape::tapebridge::TapeBridgeDaemon::main(const int argc, // exceptionThrowingMain //------------------------------------------------------------------------------ int castor::tape::tapebridge::TapeBridgeDaemon::exceptionThrowingMain( - const int argc, char **argv) throw(castor::exception::Exception) { + const int argc, char **argv) { logStartOfDaemon(argc, argv); parseCommandLine(argc, argv); @@ -256,7 +256,7 @@ std::string &castor::tape::tapebridge::TapeBridgeDaemon::appendArgvToString( // parseCommandLine //------------------------------------------------------------------------------ void castor::tape::tapebridge::TapeBridgeDaemon::parseCommandLine( - const int argc, char **argv) throw(castor::exception::Exception) { + const int argc, char **argv) { static struct Coptions longopts[] = { {"foreground", NO_ARGUMENT, NULL, 'f'}, @@ -287,7 +287,7 @@ void castor::tape::tapebridge::TapeBridgeDaemon::parseCommandLine( // Throw an exception castor::exception::InvalidArgument ex; ex.getMessage() << oss.str(); - throw(ex); + throw ex; } break; case ':': @@ -300,7 +300,7 @@ void castor::tape::tapebridge::TapeBridgeDaemon::parseCommandLine( // Throw an exception castor::exception::InvalidArgument ex; ex.getMessage() << oss.str(); - throw(ex); + throw ex; } break; default: @@ -342,7 +342,7 @@ void castor::tape::tapebridge::TapeBridgeDaemon::parseCommandLine( // Throw an exception castor::exception::InvalidArgument ex; ex.getMessage() << oss.str(); - throw(ex); + throw ex; } } @@ -355,7 +355,7 @@ void castor::tape::tapebridge::TapeBridgeDaemon:: const BulkRequestConfigParams &bulkRequestConfigParams, const TapeFlushConfigParams &tapeFlushConfigParams, const uint32_t nbDrives) - throw(castor::exception::Exception) { + { const int vdqmListenPort = utils::getPortFromConfig("TAPEBRIDGE", "VDQMPORT", TAPEBRIDGE_VDQMPORT); diff --git a/castor/tape/tapebridge/TapeBridgeDaemon.hpp b/castor/tape/tapebridge/TapeBridgeDaemon.hpp index 18c019478c1f579c696fcdac7d7526b8186c8e97..719e70846a4d04694285a2fb8d8c421676246060 100644 --- a/castor/tape/tapebridge/TapeBridgeDaemon.hpp +++ b/castor/tape/tapebridge/TapeBridgeDaemon.hpp @@ -58,7 +58,7 @@ public: * @param log Object representing the API of the CASTOR logging system. */ TapeBridgeDaemon(std::ostream &stdOut, std::ostream &stdErr, - log::Logger &log) throw(castor::exception::Exception); + log::Logger &log) ; /** * Destructor. @@ -86,7 +86,7 @@ private: * @param argv The array of command-line arguments. */ int exceptionThrowingMain(const int argc, char **argv) - throw(castor::exception::Exception); + ; /** * Logs the start of the daemon. @@ -134,7 +134,7 @@ private: * @param argv Argument vector from the executable's entry function: main(). */ void parseCommandLine(const int argc, char **argv) - throw(castor::exception::Exception); + ; /** * Writes the command-line usage message of the tapebridge daemon onto the @@ -162,7 +162,7 @@ private: const BulkRequestConfigParams &bulkRequestConfigParams, const TapeFlushConfigParams &tapeFlushConfigParams, const uint32_t nbDrives) - throw (castor::exception::Exception); + ; /** * DLF message strings. diff --git a/castor/tape/tapebridge/TapeFlushConfigParams.cpp b/castor/tape/tapebridge/TapeFlushConfigParams.cpp index 74b06b07aad279e081ff65ee9a0be9c3eb50dca2..2a18a59884a8aabd396e1669e0f06b6ad34dcffc 100644 --- a/castor/tape/tapebridge/TapeFlushConfigParams.cpp +++ b/castor/tape/tapebridge/TapeFlushConfigParams.cpp @@ -98,7 +98,7 @@ void castor::tape::tapebridge::TapeFlushConfigParams::determineTapeFlushMode() //------------------------------------------------------------------------------ uint32_t castor::tape::tapebridge::TapeFlushConfigParams:: stringToTapeFlushMode(const std::string s) - throw(castor::exception::InvalidArgument) { + { if(s == "N_FLUSHES_PER_FILE") { return TAPEBRIDGE_N_FLUSHES_PER_FILE; } else if(s == "ONE_FLUSH_PER_N_FILES") { diff --git a/castor/tape/tapebridge/TapeFlushConfigParams.hpp b/castor/tape/tapebridge/TapeFlushConfigParams.hpp index b38aa7f2164d3574d9f409e01bd128b90f29ae2c..af331ead9dd2bedf555410f7372740f480040146 100644 --- a/castor/tape/tapebridge/TapeFlushConfigParams.hpp +++ b/castor/tape/tapebridge/TapeFlushConfigParams.hpp @@ -107,7 +107,7 @@ protected: * @param s The string represention of the tape-flush mode. */ uint32_t stringToTapeFlushMode(const std::string s) - throw(castor::exception::InvalidArgument); + ; /** * With respect to using buffered tape-marks over multiple files, this diff --git a/castor/tape/tapebridge/VdqmRequestHandler.cpp b/castor/tape/tapebridge/VdqmRequestHandler.cpp index 51a0c0d742a6ba83a2e8cec9e17a5b7b9b456598..f038c27cfdab4633fa9bf647ade6b1a9a3fa0394 100644 --- a/castor/tape/tapebridge/VdqmRequestHandler.cpp +++ b/castor/tape/tapebridge/VdqmRequestHandler.cpp @@ -220,7 +220,7 @@ void castor::tape::tapebridge::VdqmRequestHandler::run(void *param) ": vdqmDriveUnitName=" << jobRequest.driveUnit << ": tpconfigUnitNames=" << driveNamesStream.str();; - throw(ex); + throw ex; } // Log an error if there are more drives attached to the tape-server than @@ -302,7 +302,7 @@ void castor::tape::tapebridge::VdqmRequestHandler::run(void *param) "Received an error message from RTCPD" ": " << rtcpdReply.errorMessage; - throw(ex); + throw ex; } // Send a positive acknowledge to the VDQM @@ -358,7 +358,7 @@ castor::legacymsg::RtcpJobReplyMsgBody const legacymsg::RtcpJobRqstMsgBody &jobRequest, const char (&bridgeCallbackHost)[io::HOSTNAMEBUFLEN], const unsigned short bridgeCallbackPort) - const throw(castor::exception::Exception) { + const { tapeBridgeClientInfo2MsgBody_t clientInfoMsgBody; legacymsg::RtcpJobReplyMsgBody rtcpdReply; @@ -431,7 +431,7 @@ void castor::tape::tapebridge::VdqmRequestHandler::exceptionThrowingRun( const legacymsg::RtcpJobRqstMsgBody &jobRequest, Counter<uint64_t> &tapebridgeTransactionCounter, const int bridgeCallbackSockFd) - throw(castor::exception::Exception) { + { // Accept the initial incoming RTCPD callback connection. // Wrap the socket file descriptor in a smart file descriptor so that it is @@ -525,7 +525,7 @@ void castor::tape::tapebridge::VdqmRequestHandler::exceptionThrowingRun( ": tapebridgeTransId=" << tapebridgeTransId << ": " << ex.getMessage().str(); - throw(ex2); + throw ex2; } return; @@ -557,7 +557,7 @@ void castor::tape::tapebridge::VdqmRequestHandler::exceptionThrowingRun( ": vid=" << volume->vid() << ": " << ex.getMessage().str(); - throw(ex2); + throw ex2; } } @@ -637,7 +637,7 @@ void castor::tape::tapebridge::VdqmRequestHandler::stop() //----------------------------------------------------------------------------- void castor::tape::tapebridge::VdqmRequestHandler:: checkRtcpJobSubmitterIsAuthorised(const int socketFd) - throw(castor::exception::Exception) { + { char peerHost[CA_MAXHOSTNAMELEN+1]; diff --git a/castor/tape/tapebridge/VdqmRequestHandler.hpp b/castor/tape/tapebridge/VdqmRequestHandler.hpp index bf14d0053e0414a875a55535f94453c32a92d7fc..081498003a8fcc0ac720c4c97da77174265a768c 100644 --- a/castor/tape/tapebridge/VdqmRequestHandler.hpp +++ b/castor/tape/tapebridge/VdqmRequestHandler.hpp @@ -160,7 +160,7 @@ private: const legacymsg::RtcpJobRqstMsgBody &jobRequest, Counter<uint64_t> &tapebridgeTransactionCounter, const int bridgeCallbackSockFd) - throw(castor::exception::Exception); + ; /** * Throws an exception if the peer host associated with the specified @@ -169,7 +169,7 @@ private: * @param socketFd The socket file descriptor. */ static void checkRtcpJobSubmitterIsAuthorised(const int socketFd) - throw(castor::exception::Exception); + ; /** * Sends information about the tapebridged daemon to the rtcpd daemon. @@ -196,7 +196,7 @@ private: const legacymsg::RtcpJobRqstMsgBody &jobRequest, const char (&bridgeCallbackHost)[io::HOSTNAMEBUFLEN], const unsigned short bridgeCallbackPort) - const throw(castor::exception::Exception); + const ; }; // class VdqmRequestHandler diff --git a/castor/tape/tapebridge/VmgrTxRx.cpp b/castor/tape/tapebridge/VmgrTxRx.cpp index 6f277d41e770d1b2ec42bce4f7577f10448d5089..6e9b351b177f2cd571a08a8a984438d4d7b16e29 100644 --- a/castor/tape/tapebridge/VmgrTxRx.cpp +++ b/castor/tape/tapebridge/VmgrTxRx.cpp @@ -50,7 +50,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( const uint32_t gid, const char *const vid, legacymsg::VmgrTapeInfoMsgBody &reply) - throw(castor::exception::Exception) { + { // Determine the VMGR host char vmgrHost[CA_MAXHOSTNAMELEN+1]; @@ -63,7 +63,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( castor::exception::Exception ex(EVMGRNOHOST); ex.getMessage() << "VMGR HOST not set"; - throw(ex); + throw ex; } } @@ -78,7 +78,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( ex.getMessage() << "VMGR PORT is not a valid unsigned integer" ": Value=" << p; - throw(ex); + throw ex; } vmgrPort = atoi(p); @@ -178,7 +178,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( ": reqType=VMGR_RC" ": vid=" << vid << ": VMGR error code=" << header.lenOrStatus; - throw(ex); + throw ex; } break; @@ -201,7 +201,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( ": receive buffer size=" << sizeof(bodyBuf) << " bytes" ": error string size including null terminator=" << header.lenOrStatus << " bytes"; - throw(ex); + throw ex; } // Receive the error string @@ -226,7 +226,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( ": reqType=MSG_ERR" ": vid=" << vid << ": VMGR error string=" << bodyBuf; - throw(ex); + throw ex; } // The VMGR returned the tape information @@ -247,7 +247,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( ": vid=" << vid << ": receive buffer size=" << sizeof(bodyBuf) << " bytes" ": message body size=" << header.lenOrStatus << " bytes"; - throw(ex); + throw ex; } // Receive the message body @@ -294,7 +294,7 @@ void castor::tape::tapebridge::VmgrTxRx::getTapeInfoFromVmgr( ": reqType=" << header.reqType << ": vid=" << vid; - throw(ex); + throw ex; } } // switch(header.reqType) } diff --git a/castor/tape/tapebridge/VmgrTxRx.hpp b/castor/tape/tapebridge/VmgrTxRx.hpp index 6a1d12cc14d3ff6668c8b3d1e637112fe7b3296e..92cc2c6305f864f40055fcf2d35f2237bec024c6 100644 --- a/castor/tape/tapebridge/VmgrTxRx.hpp +++ b/castor/tape/tapebridge/VmgrTxRx.hpp @@ -67,7 +67,7 @@ public: const uint32_t gid, const char *const vid, legacymsg::VmgrTapeInfoMsgBody &reply) - throw(castor::exception::Exception); + ; }; // class VmgrTxRx diff --git a/castor/tape/tapegateway/ScopedTransaction.cpp b/castor/tape/tapegateway/ScopedTransaction.cpp index c74e7c049614ae153d9b9cf37b2d16425c6d7f27..93e14fa0635fad4798e3f00c011f6052dd398fd0 100644 --- a/castor/tape/tapegateway/ScopedTransaction.cpp +++ b/castor/tape/tapegateway/ScopedTransaction.cpp @@ -50,13 +50,13 @@ namespace castor { }; // Explicit commit, disengaging the destructor's mechanism - void ScopedTransaction::commit() throw (castor::exception::Exception) { + void ScopedTransaction::commit() { m_OraSvc->commit(); m_transactionClosed = true; } // Explicit rollback, disengaging the destructor's mechanism - void ScopedTransaction::rollback() throw (castor::exception::Exception) { + void ScopedTransaction::rollback() { m_OraSvc->rollback(); m_transactionClosed = true; } diff --git a/castor/tape/tapegateway/ScopedTransaction.hpp b/castor/tape/tapegateway/ScopedTransaction.hpp index 42ac0d024ec04a957b2342038ab65193a164d076..4631935ef3b3eaa3ec9dde52228e33c71a4ceb0e 100644 --- a/castor/tape/tapegateway/ScopedTransaction.hpp +++ b/castor/tape/tapegateway/ScopedTransaction.hpp @@ -53,10 +53,10 @@ namespace castor { virtual ~ScopedTransaction(); /* commits the transaction */ - void commit() throw (castor::exception::Exception); + void commit() ; /* explicitely rollbacks the transaction */ - void rollback() throw (castor::exception::Exception); + void rollback() ; private: diff --git a/castor/tape/tapegateway/daemon/ITapeGatewaySvc.hpp b/castor/tape/tapegateway/daemon/ITapeGatewaySvc.hpp index 1dd026d44953dd9fd8836e347a3623cc9445c37c..3d7628451af2c570d3fffc010d03429b368febd8 100644 --- a/castor/tape/tapegateway/daemon/ITapeGatewaySvc.hpp +++ b/castor/tape/tapegateway/daemon/ITapeGatewaySvc.hpp @@ -71,7 +71,7 @@ namespace castor { * Get all the pending migration mounts */ virtual void getMigrationMountsWithoutTapes(std::list<migrationMountParameters>& migrationMounts) - throw (castor::exception::Exception)=0; + =0; struct blockingSessionInfo { std::string vid; @@ -83,7 +83,7 @@ namespace castor { */ virtual void getMigrationMountReqsForVids(const std::list<std::string>& vids, std::list<blockingSessionInfo>& blockingSessions) - throw (castor::exception::Exception)=0; + =0; /** * Associate to each migrationMountParameters a Tape @@ -91,7 +91,7 @@ namespace castor { virtual void attachTapesToMigMounts(const std::list<u_signed64>& strIds, const std::list<std::string>& vids, const std::list<int>& fseqs) - throw (castor::exception::Exception)=0; + =0; /** get a tape for which a VDQM request si needed * @param vid a string filled with the VID of the selected tape @@ -102,7 +102,7 @@ namespace castor { virtual void getTapeWithoutDriveReq(std::string &vid, int &vdqmPriority, int &mode) - throw (castor::exception::Exception) = 0; + = 0; /** updates the db with the VDQM mountTransaction id * after we have sent a recall or migration request to VDQM @@ -118,7 +118,7 @@ namespace castor { const int mode, const char *label, const char *density) - throw (castor::exception::Exception) = 0; + = 0; /** * Little nested struct to simplify the interface of getTapesWithDriveReqs @@ -137,34 +137,34 @@ namespace castor { */ virtual void getTapesWithDriveReqs(std::list<TapeRequest>& requests, const u_signed64& timeOut) - throw (castor::exception::Exception) = 0; + = 0; /** restarts requests lost by VDQM or a request which was processed * while the tapegateway was down * @param mountTransactionIds the transaction ids of the requests to be restarted */ virtual void restartLostReqs(const std::list<int>& mountTransactionIds) - throw (castor::exception::Exception) = 0; + = 0; /** * Get the tapecopies which faced a migration failure */ virtual void getFailedMigrations(std::list<castor::tape::tapegateway::RetryPolicyElement>& candidates) - throw (castor::exception::Exception)=0; + =0; /** * Update the db using the retry migration policy returned values */ virtual void setMigRetryResult(const std::list<u_signed64>& mjToRetry, const std::list<u_signed64>& mjToFail ) - throw (castor::exception::Exception)=0; + =0; /** * Update the database when the Tapegateway allows us to serve a request */ virtual void startTapeSession( const castor::tape::tapegateway::VolumeRequest& startReq, castor::tape::tapegateway::Volume& volume) - throw (castor::exception::Exception)=0; + =0; /** * Structure carrying the tape information needed for a release. @@ -183,7 +183,7 @@ namespace castor { */ virtual void getTapeToRelease(const u_signed64& mountTransactionId, castor::tape::tapegateway::ITapeGatewaySvc::TapeToReleaseInfo& tape) - throw (castor::exception::Exception)=0; + =0; /** Ends a tape session by dropping it from the DB. If the tapebridge * comes afterwards asking for more data on the dropped session, it will @@ -195,7 +195,7 @@ namespace castor { */ virtual void endTapeSession(const u_signed64 mountTransactionId, const int errorCode = 0) - throw (castor::exception::Exception) = 0; + = 0; /** Ends a tape session by dropping it from the DB. If the tapebridge * comes afterwards asking for more data on the dropped session, it will @@ -209,13 +209,13 @@ namespace castor { */ virtual void endTapeSessionAutonomous(const u_signed64 mountTransactionId, const int errorCode = 0) - throw (castor::exception::Exception) = 0; + = 0; /** * delete migration mounts with wrong tapepool */ virtual void deleteMigrationMountWithBadTapePool(const u_signed64 migrationMountId) - throw (castor::exception::Exception)=0; + =0; /** * Mark tape full for the tape session. @@ -224,7 +224,7 @@ namespace castor { * the session. Session is passed by VDQM request id (like for end/failSession). */ virtual void flagTapeFullForMigrationSession(const u_signed64& tapeRequestId) - throw (castor::exception::Exception) = 0; + = 0; /** * Find the VID (and just it) for a migration mount. @@ -245,7 +245,7 @@ namespace castor { const std::string &vid, const int errorCode, const std::string &errorMsg) - throw (castor::exception::Exception) = 0; + = 0; /** * Get the next best files to migrate @@ -254,7 +254,7 @@ namespace castor { const std::string & context, u_signed64 mountTransactionId, u_signed64 maxFiles, u_signed64 maxBytes, std::queue<castor::tape::tapegateway::FileToMigrateStruct>& filesToMigrate) - throw (castor::exception::Exception)=0; + =0; /** * Structure extending the FileToRecallStruct to allow detailed logging. @@ -263,7 +263,7 @@ namespace castor { public: /* We need to define the constructors for exceptions throwing specs. (Inheritance would bread otherwise) */ FileToRecallStructWithContext() throw() {}; - virtual ~FileToRecallStructWithContext() throw () {}; + virtual ~FileToRecallStructWithContext() throw() {}; u_signed64 copyNb; u_signed64 eUid; u_signed64 eGid; @@ -281,7 +281,7 @@ namespace castor { const std::string & context, u_signed64 mountTransactionId, u_signed64 maxFiles, u_signed64 maxBytes, std::queue<FileToRecallStructWithContext>& filesToRecall) - throw (castor::exception::Exception)=0; + =0; /** * Check and update the NS and then the stager DB accordingly from migration result @@ -292,7 +292,7 @@ namespace castor { const std::string & context, u_signed64 mountTransactionId, std::vector<FileMigratedNotificationStruct *>& successes, std::vector<FileErrorReportStruct *>& failures) - throw (castor::exception::Exception)=0; + =0; /** * Check the NS and update the stager DB accordingly for files from recall result @@ -302,7 +302,7 @@ namespace castor { const std::string & context, u_signed64 mountTransactionId, std::vector<FileRecalledNotificationStruct *>& successes, std::vector<FileErrorReportStruct *>& failures) - throw (castor::exception::Exception)=0; + =0; /** * Bypass access the the underlying DB accessor allowing safe handling from the caller diff --git a/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.cpp b/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.cpp index 809b87dfeb0d5015f3e8fe4abd6e9752e1cae7dd..71fcdb90606d18bb08eb5c16d21078260ee477d4 100644 --- a/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.cpp +++ b/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.cpp @@ -44,7 +44,7 @@ // is not strictly greater than the highest know Fseq for this tape in the name // server (meaning an overwrite). void castor::tape::tapegateway::NsTapeGatewayHelper::checkFseqForWrite (const std::string &vid, int Fseq) - throw (castor::exception::Exception) { + { struct Cns_segattrs segattrs; memset (&segattrs, 0, sizeof(struct Cns_segattrs)); int rc = Cns_lastfseq (vid.c_str(), 0, &segattrs); // side = 0 hardcoded diff --git a/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.hpp b/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.hpp index 2863b2f14a28fecdded81c8f772bc8b02b197d6f..a5ac0c9c3f15341e8dde02104b79725f6f3bac33 100644 --- a/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.hpp +++ b/castor/tape/tapegateway/daemon/NsTapeGatewayHelper.hpp @@ -39,7 +39,7 @@ namespace castor { public: void checkFseqForWrite (const std::string &vid, int Fseq) - throw (castor::exception::Exception); + ; /* Ad-hoc exceptions */ class NoSuchFileException: public castor::exception::Exception { diff --git a/castor/tape/tapegateway/daemon/TapeGatewayDaemon.cpp b/castor/tape/tapegateway/daemon/TapeGatewayDaemon.cpp index 4305b76f50d9b688640bdd842ed9443115ee47e8..7b9bb5fca2288b6cb52ca61a41000dfa78004bd8 100644 --- a/castor/tape/tapegateway/daemon/TapeGatewayDaemon.cpp +++ b/castor/tape/tapegateway/daemon/TapeGatewayDaemon.cpp @@ -91,7 +91,7 @@ try { //------------------------------------------------------------------------------ // exceptionThrowingMain //------------------------------------------------------------------------------ -int castor::tape::tapegateway::TapeGatewayDaemon::exceptionThrowingMain(int argc,char **argv) throw(castor::exception::Exception) { +int castor::tape::tapegateway::TapeGatewayDaemon::exceptionThrowingMain(int argc,char **argv) { // Log the start of the daemon logStart(argc, argv); // Check the service to access the database can be obtained @@ -104,7 +104,7 @@ int castor::tape::tapegateway::TapeGatewayDaemon::exceptionThrowingMain(int argc castor::exception::Exception ex; ex.getMessage() << "Failed to get TapeGateway Oracle database service"; - throw(ex); + throw ex; } // Get the min and max number of thread used by the Worker diff --git a/castor/tape/tapegateway/daemon/TapeGatewayDaemon.hpp b/castor/tape/tapegateway/daemon/TapeGatewayDaemon.hpp index 420e86d790451da71509cb1ef6744484d68cda17..b07a5bcd5dca5100f3c092f333fbd455a9142f6b 100644 --- a/castor/tape/tapegateway/daemon/TapeGatewayDaemon.hpp +++ b/castor/tape/tapegateway/daemon/TapeGatewayDaemon.hpp @@ -57,7 +57,7 @@ namespace castor { * DLF and the "exception catch and log" logic. */ int exceptionThrowingMain(int argc,char **argv) - throw(castor::exception::Exception); + ; /** * Logs the start of the daemon. diff --git a/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.cpp b/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.cpp index 74b0ece3d979564ad38576706fe35cb94f75dab2..ab4c3aa765755cb7780c7867dfc4fb24820217ae 100644 --- a/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.cpp +++ b/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.cpp @@ -38,7 +38,7 @@ // connectToVdqm //------------------------------------------------------------------------------ void castor::tape::tapegateway::VdqmTapeGatewayHelper::connectToVdqm() - throw (castor::exception::Exception) { + { serrno=0; m_connection=NULL; int rc = vdqm_Connect(&m_connection); @@ -57,7 +57,7 @@ void castor::tape::tapegateway::VdqmTapeGatewayHelper::connectToVdqm() //------------------------------------------------------------------------------ int castor::tape::tapegateway::VdqmTapeGatewayHelper::createRequestForAggregator (const std::string &vid, const char *dgn, const int mode, const int port, const int priority) - throw (castor::exception::Exception) { + { // Due to historical compoenents, we first send the priority of the future // request (set on the VID only) and only then we create the request serrno = 0; @@ -88,7 +88,7 @@ int castor::tape::tapegateway::VdqmTapeGatewayHelper::createRequestForAggregator // confirmRequestToVdqm //------------------------------------------------------------------------------ void castor::tape::tapegateway::VdqmTapeGatewayHelper::confirmRequestToVdqm() - throw (castor::exception::Exception) { + { // after saving the transaction id in the db I send the confirmation to vdqm serrno=0; int ret = vdqm_QueueRequestForAggregator(m_connection); @@ -107,7 +107,7 @@ void castor::tape::tapegateway::VdqmTapeGatewayHelper::confirmRequestToVdqm() //------------------------------------------------------------------------------ void castor::tape::tapegateway::VdqmTapeGatewayHelper::checkVdqmForRequest (const int mountTransactionId) - throw (castor::exception::Exception) { + { serrno=0; int rc = vdqm_PingServer(NULL,NULL,mountTransactionId); // dgn is not given if (rc < 0) { @@ -123,7 +123,7 @@ void castor::tape::tapegateway::VdqmTapeGatewayHelper::checkVdqmForRequest // disconnectFromVdqm //------------------------------------------------------------------------------ void castor::tape::tapegateway::VdqmTapeGatewayHelper::disconnectFromVdqm() - throw (castor::exception::Exception) { + { serrno=0; int rc = vdqm_Disconnect(&m_connection); if (rc<0) { diff --git a/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.hpp b/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.hpp index 9fd06147d01d8e34b88bbf46f7bca08774bff2ea..764d7b6ec451209b14b26b8305aa260de1b03312 100644 --- a/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.hpp +++ b/castor/tape/tapegateway/daemon/VdqmTapeGatewayHelper.hpp @@ -45,7 +45,7 @@ namespace castor { * connect to VDQM * @exception throws CASTOR exception if not successful */ - void connectToVdqm() throw(castor::exception::Exception); + void connectToVdqm() ; /** * create a request in VDQM @@ -61,13 +61,13 @@ namespace castor { const int mode, const int port, const int priority) - throw (castor::exception::Exception); + ; /** * validate a VDQM request created with createRequestForAggregator * @exception throws CASTOR exception if not successful */ - void confirmRequestToVdqm() throw (castor::exception::Exception); + void confirmRequestToVdqm() ; /** * check existence of a given request in VDQM @@ -75,13 +75,13 @@ namespace castor { * @exception throws CASTOR exception if not successful */ static void checkVdqmForRequest(const int mountTransactionId) - throw (castor::exception::Exception); + ; /** * disconnect to VDQM * @exception throws CASTOR exception if not successful */ - void disconnectFromVdqm()throw (castor::exception::Exception); + void disconnectFromVdqm(); public: diff --git a/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.cpp b/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.cpp index dcee094441a9071cd11bc62e01d5d003d0094ef7..908fbbcbdec03187537774ef5c34103094c1fcd3 100644 --- a/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.cpp +++ b/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.cpp @@ -48,7 +48,7 @@ void castor::tape::tapegateway::VmgrTapeGatewayHelper::getTapeForMigration std::string &outVid, int& outStartFseq, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception) { + { // Sanity checks if (tapepoolName.empty() || initialSizeToTransfer==0) { castor::exception::Exception ex(EINVAL); @@ -135,7 +135,7 @@ void castor::tape::tapegateway::VmgrTapeGatewayHelper::getTapeForMigration void castor::tape::tapegateway::VmgrTapeGatewayHelper::resetBusyTape (const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception) { + { /* Retrieve from vmgr through helper class */ TapeInfo info = getTapeInfo(vid, shuttingDown); int status = info.vmgrTapeInfo.status; @@ -157,7 +157,7 @@ void castor::tape::tapegateway::VmgrTapeGatewayHelper::bulkUpdateTapeInVmgr( u_signed64 filesCount, signed64 highestFseq, u_signed64 totalBytes, u_signed64 totalCompressedBytes, const std::string& vid, const utils::BoolFunctor &shuttingDown) -throw (castor::exception::Exception){ +{ TapeInfo tinfo = getTapeInfoAssertAvailable (vid, shuttingDown); /* Retrieve from vmgr through helper class, with assertion */ int flags = tinfo.vmgrTapeInfo.status; @@ -216,7 +216,7 @@ throw (castor::exception::Exception){ void castor::tape::tapegateway::VmgrTapeGatewayHelper::setTapeAsFull (const std::string& vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception) { + { // called if FileErrorReport ENOSPC /* Retrieve from vmgr through helper class */ TapeInfo info = getTapeInfo(vid, shuttingDown); @@ -237,7 +237,7 @@ void castor::tape::tapegateway::VmgrTapeGatewayHelper::setTapeAsFull void castor::tape::tapegateway::VmgrTapeGatewayHelper::setTapeAsReadonlyAndUnbusy (const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception) { + { /* Retrieve from vmgr through helper class */ TapeInfo info = getTapeInfo(vid, shuttingDown); int status = info.vmgrTapeInfo.status; @@ -275,7 +275,7 @@ int castor::tape::tapegateway::VmgrTapeGatewayHelper::maxFseqFromLabel(const cha castor::tape::tapegateway::TapeInfo castor::tape::tapegateway::VmgrTapeGatewayHelper::getTapeInfo (const std::string& vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception) { + { /* Sanity check */ if (vid.empty()) { castor::exception::Exception ex(EINVAL); @@ -322,7 +322,7 @@ castor::tape::tapegateway::VmgrTapeGatewayHelper::getTapeInfo castor::tape::tapegateway::TapeInfo castor::tape::tapegateway::VmgrTapeGatewayHelper::getTapeInfoAssertAvailable (const std::string& vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception) { + { // call getTapeInfo TapeInfo info = getTapeInfo(vid, shuttingDown); // Interpret the status and throw an exception for non-available tapes. diff --git a/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.hpp b/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.hpp index 0eb705e12cc46752ab2b669dc8b587ef440cc8b3..9f0c986e81c8f30c3202218223590d09bd9be606 100644 --- a/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.hpp +++ b/castor/tape/tapegateway/daemon/VmgrTapeGatewayHelper.hpp @@ -60,7 +60,7 @@ namespace castor { std::string &vid, int& startFseq, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; /** unbusy a tape in VMGR * @param vid the vid of the tape to reset @@ -69,17 +69,17 @@ namespace castor { */ void resetBusyTape(const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; void bulkUpdateTapeInVmgr(u_signed64 filesCount, signed64 highestFseq, u_signed64 totalBytes, u_signed64 totalCompressedBytes, const std::string& vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; void setTapeAsFull(const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; void setTapeAsReadonlyAndUnbusy(const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; int maxFseqFromLabel(const char* label); @@ -89,7 +89,7 @@ namespace castor { * @exception throws CASTOR exceptions in case of error */ TapeInfo getTapeInfo(const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; /* get information concerning a tape from VMGR and checks * that the tape is available @@ -99,7 +99,7 @@ namespace castor { * if the tape is not available */ TapeInfo getTapeInfoAssertAvailable(const std::string &vid, const utils::BoolFunctor &shuttingDown) - throw (castor::exception::Exception); + ; } // end of namespace VmgrTapeGatewayHelper } // end of namespace tapegateway diff --git a/castor/tape/tapegateway/daemon/WorkerThread.cpp b/castor/tape/tapegateway/daemon/WorkerThread.cpp index 58a6a42b1d810b7cc4ea88cbd2f877adaf16e653..eadaa177bf9d75bfbc281da89f7bc37a6a80c2a4 100644 --- a/castor/tape/tapegateway/daemon/WorkerThread.cpp +++ b/castor/tape/tapegateway/daemon/WorkerThread.cpp @@ -239,7 +239,7 @@ std::string castor::tape::tapegateway::WorkerThread::requesterInfo::str () castor::IObject* castor::tape::tapegateway::WorkerThread::handleStartWorker( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester ) throw(castor::exception::Exception){ + requesterInfo& requester ) { // I received a start worker request Volume* response=new Volume(); @@ -335,7 +335,7 @@ castor::IObject* castor::tape::tapegateway::WorkerThread::handleStartWorker( castor::IObject* castor::tape::tapegateway::WorkerThread::handleEndWorker( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester) throw(castor::exception::Exception){ + requesterInfo& requester) { // I received an EndTransferRequest, I send back an EndTransferResponse std::auto_ptr <NotificationAcknowledge> response(new NotificationAcknowledge()); EndNotification * pEndRep = dynamic_cast<EndNotification *>(&obj); @@ -476,7 +476,7 @@ castor::IObject* castor::tape::tapegateway::WorkerThread::handleEndWorker( castor::IObject* castor::tape::tapegateway::WorkerThread::handleFailWorker( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester ) throw(castor::exception::Exception){ + requesterInfo& requester ) { // We received an EndNotificationErrorReport EndNotificationErrorReport *pEndErrRep = dynamic_cast<EndNotificationErrorReport *>(&obj); if (!pEndErrRep) { @@ -618,7 +618,7 @@ castor::IObject* castor::tape::tapegateway::WorkerThread::handleFailWorker( castor::IObject* castor::tape::tapegateway::WorkerThread::handleFileMigrationReportList( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester ) throw(castor::exception::Exception){ + requesterInfo& requester ) { // first check we are called with the proper class FileMigrationReportList* rep = dynamic_cast<FileMigrationReportList *>(&obj); if (!rep) { @@ -861,7 +861,7 @@ castor::IObject* castor::tape::tapegateway::WorkerThread::handleFileMigrationRe castor::IObject* castor::tape::tapegateway::WorkerThread::handleFileRecallReportList( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester ) throw(castor::exception::Exception){ + requesterInfo& requester ) { // Unlike the migrations, which are linked by the sequential writing, the recalls // Can be considered as independent entities. // We can then push the data to the DB blindly in both success and failure cases. @@ -934,7 +934,7 @@ castor::IObject* castor::tape::tapegateway::WorkerThread::handleFileRecallRepor castor::IObject* castor::tape::tapegateway::WorkerThread::handleFilesToMigrateListRequest( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester ) throw(castor::exception::Exception){ + requesterInfo& requester ) { // first check we are called with the proper class FilesToMigrateListRequest* req_p = dynamic_cast <FilesToMigrateListRequest *>(&obj); if (!req_p) { @@ -1061,7 +1061,7 @@ castor::IObject* castor::tape::tapegateway::WorkerThread::handleFilesToMigrateL castor::IObject* castor::tape::tapegateway::WorkerThread::handleFilesToRecallListRequest( castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, - requesterInfo& requester ) throw(castor::exception::Exception){ + requesterInfo& requester ) { // first check we are called with the proper class FilesToRecallListRequest * req = dynamic_cast <FilesToRecallListRequest *>(&obj); if (!req) { @@ -1211,7 +1211,7 @@ void castor::tape::tapegateway::WorkerThread::setSessionToClosing ( castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, castor::tape::tapegateway::WorkerThread::requesterInfo& requester, u_signed64 mountTransactionId) -throw () +throw() { try { oraSvc.endTapeSession(mountTransactionId); @@ -1234,7 +1234,7 @@ throw () } castor::tape::tapegateway::WorkerThread::fileErrorClassification -castor::tape::tapegateway::WorkerThread::classifyBridgeMigrationFileError(int errorCode) throw () { +castor::tape::tapegateway::WorkerThread::classifyBridgeMigrationFileError(int errorCode) throw() { // We rely on the default for the return values: //fileInvolved(true), //fileRetryable(true), @@ -1248,7 +1248,7 @@ castor::tape::tapegateway::WorkerThread::classifyBridgeMigrationFileError(int er } castor::tape::tapegateway::WorkerThread::fileErrorClassification -castor::tape::tapegateway::WorkerThread::classifyBridgeRecallFileError(int /*errorCode*/) throw () { +castor::tape::tapegateway::WorkerThread::classifyBridgeRecallFileError(int /*errorCode*/) throw() { // We rely on the default for the return values: //fileInvolved(true), //fileRetryable(true), @@ -1259,7 +1259,7 @@ castor::tape::tapegateway::WorkerThread::classifyBridgeRecallFileError(int /*err void castor::tape::tapegateway::WorkerThread::logInternalError ( castor::exception::Exception e, requesterInfo& requester, - FileMigrationReportList & fileMigrationReportList) throw () { + FileMigrationReportList & fileMigrationReportList) throw() { castor::dlf::Param params[] ={ castor::dlf::Param("IP", castor::dlf::IPAddress(requester.ip)), castor::dlf::Param("Port",requester.port), @@ -1274,7 +1274,7 @@ void castor::tape::tapegateway::WorkerThread::logInternalError ( void castor::tape::tapegateway::WorkerThread::logInternalError ( castor::exception::Exception e, requesterInfo& requester, - FileRecallReportList &fileRecallReportList) throw () { + FileRecallReportList &fileRecallReportList) throw() { castor::dlf::Param params[] ={ castor::dlf::Param("IP", castor::dlf::IPAddress(requester.ip)), castor::dlf::Param("Port",requester.port), diff --git a/castor/tape/tapegateway/daemon/WorkerThread.hpp b/castor/tape/tapegateway/daemon/WorkerThread.hpp index 292776e4ed8665c0f701ddc36ed006c5b0fa3741..8c1a1fb1efc24c59fe4e216af40b12a2e506b19f 100644 --- a/castor/tape/tapegateway/daemon/WorkerThread.hpp +++ b/castor/tape/tapegateway/daemon/WorkerThread.hpp @@ -86,13 +86,13 @@ namespace tapegateway{ // Helper converting requester structure into a context string std::string requester2str (const requesterInfo & reqer); // handlers used with the different message types - castor::IObject* handleStartWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); - castor::IObject* handleEndWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); - castor::IObject* handleFailWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); - castor::IObject* handleFileMigrationReportList (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); - castor::IObject* handleFileRecallReportList (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); - castor::IObject* handleFilesToMigrateListRequest (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); - castor::IObject* handleFilesToRecallListRequest (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw(castor::exception::Exception); + castor::IObject* handleStartWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; + castor::IObject* handleEndWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; + castor::IObject* handleFailWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; + castor::IObject* handleFileMigrationReportList (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; + castor::IObject* handleFileRecallReportList (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; + castor::IObject* handleFilesToMigrateListRequest (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; + castor::IObject* handleFilesToRecallListRequest (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) ; // Helper function for setting a sesssion to closing in the DB. // This is usually in reaction to a problem, which is logged in the caller. @@ -102,7 +102,7 @@ namespace tapegateway{ void setSessionToClosing (castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, castor::tape::tapegateway::WorkerThread::requesterInfo& requester, u_signed64 mountTransactionId) - throw (); + throw(); // Error classifiers. They return a class with booleans indicating the decision. // They are used for dispatch criteria in handle report list functions. @@ -117,15 +117,15 @@ namespace tapegateway{ bool fileRetryable; bool tapeIsFull; }; - fileErrorClassification classifyBridgeMigrationFileError(int errorCode) throw (); - fileErrorClassification classifyBridgeRecallFileError(int errorCode) throw (); + fileErrorClassification classifyBridgeMigrationFileError(int errorCode) throw(); + fileErrorClassification classifyBridgeRecallFileError(int errorCode) throw(); // Helper functions for logging database errors (overloaded variants with different // parameters. void logInternalError (castor::exception::Exception e, requesterInfo& requester, - FileMigrationReportList & fileMigrationReportList) throw (); + FileMigrationReportList & fileMigrationReportList) throw(); void logInternalError (castor::exception::Exception e, requesterInfo& requester, - FileRecallReportList &fileRecallReportList) throw (); + FileRecallReportList &fileRecallReportList) throw(); void logMigrationNotified (Cuuid_t uuid, u_signed64 mountTransactionId, u_signed64 aggregatorTransactionId, struct Cns_fileid* castorFileId, diff --git a/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.cpp b/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.cpp index f940290d1534a3837cf6346d718cd6e711ff7c9b..0778f4718fefefddf434155f16e1072f743446c0 100644 --- a/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.cpp +++ b/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.cpp @@ -181,7 +181,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::reset() throw() { void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getMigrationMountsWithoutTapes (std::list<castor::tape::tapegateway::ITapeGatewaySvc::migrationMountParameters>& migrationMounts) - throw (castor::exception::Exception){ + { oracle::occi::ResultSet *rs = NULL; try { // Check whether the statements are ok @@ -238,7 +238,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getMigrationMountsWithou void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getMigrationMountReqsForVids( const std::list<std::string>& vids, std::list<blockingSessionInfo>& blockingSessions) -throw (castor::exception::Exception) { + { if (!blockingSessions.empty()) { castor::exception::Exception ex; ex.getMessage() @@ -286,7 +286,7 @@ throw (castor::exception::Exception) { //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::attachTapesToMigMounts(const std::list<u_signed64>& MMIds,const std::list<std::string>& vids, const std::list<int>& fseqs) - throw (castor::exception::Exception){ + { unsigned char (*bufferFseqs)[21]=NULL; ub2 *lensFseqs=NULL; unsigned char (*bufferMigrationMountIds)[21]=NULL; @@ -428,7 +428,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::attachTapesToMigMounts(c //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getTapeWithoutDriveReq (std::string &vid, int &vdqmPriority, int &mode) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_getTapeWithoutDriveReqStatement) { @@ -459,7 +459,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getTapeWithoutDriveReq void castor::tape::tapegateway::ora::OraTapeGatewaySvc::attachDriveReq (const std::string &vid, const u_signed64 mountTransactionId, const int mode, const char *label, const char *density) - throw (castor::exception::Exception){ + { try { // Check whether the statements are ok if (0 == m_attachDriveReqStatement) { @@ -491,7 +491,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::attachDriveReq void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getTapesWithDriveReqs (std::list<TapeRequest>& requests, const u_signed64& timeOut) - throw (castor::exception::Exception){ + { try { // Check whether the statements are ok if (0 == m_getTapesWithDriveReqsStatement) { @@ -533,7 +533,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getTapesWithDriveReqs //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::restartLostReqs (const std::list<int>& mountTransactionIds) - throw (castor::exception::Exception){ + { unsigned char (*bufferMountTransactionIds)[21]=NULL; ub2 *lensMountTransactionIds=NULL; try { @@ -594,7 +594,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::restartLostReqs void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getFailedMigrations( std::list<castor::tape::tapegateway::RetryPolicyElement>& candidates) - throw (castor::exception::Exception) + { oracle::occi::ResultSet *rs = NULL; try { @@ -655,7 +655,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getFailedMigrations( // setMigRetryResult //---------------------------------------------------------------------------- -void castor::tape::tapegateway::ora::OraTapeGatewaySvc::setMigRetryResult(const std::list<u_signed64>& mjToRetry, const std::list<u_signed64>& mjToFail ) throw (castor::exception::Exception) { +void castor::tape::tapegateway::ora::OraTapeGatewaySvc::setMigRetryResult(const std::list<u_signed64>& mjToRetry, const std::list<u_signed64>& mjToFail ) { unsigned char (*bufferRetry)[21]=NULL; @@ -776,7 +776,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::setMigRetryResult(const //-------------------------------------------------------------------------- // startTapeSession //-------------------------------------------------------------------------- -void castor::tape::tapegateway::ora::OraTapeGatewaySvc::startTapeSession(const castor::tape::tapegateway::VolumeRequest& startRequest, castor::tape::tapegateway::Volume& volume ) throw (castor::exception::Exception) { +void castor::tape::tapegateway::ora::OraTapeGatewaySvc::startTapeSession(const castor::tape::tapegateway::VolumeRequest& startRequest, castor::tape::tapegateway::Volume& volume ) { try { // Check whether the statements are ok if (0 == m_startTapeSessionStatement) { @@ -828,7 +828,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::startTapeSession(const c //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::endTapeSession (const u_signed64 mountTransactionId, const int errorCode) - throw (castor::exception::Exception){ + { try { // Check whether the statements are ok if (0 == m_endTapeSessionStatement) { @@ -852,7 +852,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::endTapeSession //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::endTapeSessionAutonomous (const u_signed64 mountTransactionId, const int errorCode) - throw (castor::exception::Exception){ + { try { // Check whether the statements are ok if (0 == m_endTapeSessionAutonomousStatement) { @@ -877,7 +877,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::endTapeSessionAutonomous void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getTapeToRelease (const u_signed64& mountTransactionId, castor::tape::tapegateway::ITapeGatewaySvc::TapeToReleaseInfo& tape) - throw (castor::exception::Exception){ + { try { // Check whether the statements are ok if (0 == m_getTapeToReleaseStatement) { @@ -910,7 +910,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::cancelMigrationOrRecall const std::string &vid, const int errorCode, const std::string &errorMsg) - throw (castor::exception::Exception) { + { try { // Check whether the statements are ok if (0 == m_cancelMigrationOrRecallStatement) { @@ -938,7 +938,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::cancelMigrationOrRecall // deleteMigrationMountWithBadTapePool //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::deleteMigrationMountWithBadTapePool(const u_signed64 migrationMountId) - throw (castor::exception::Exception){ + { try { // Check whether the statements are ok if (0 == m_deleteMigrationMountWithBadTapePoolStatement) { @@ -962,7 +962,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::deleteMigrationMountWith // flagTapeFullForMigrationSession //---------------------------------------------------------------------------- -void castor::tape::tapegateway::ora::OraTapeGatewaySvc::flagTapeFullForMigrationSession(const u_signed64& tapeRequestId)throw (castor::exception::Exception){ +void castor::tape::tapegateway::ora::OraTapeGatewaySvc::flagTapeFullForMigrationSession(const u_signed64& tapeRequestId){ try { // Check whether the statements are ok @@ -1023,7 +1023,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getBulkFilesToMigrate ( const std::string & context, u_signed64 mountTransactionId, u_signed64 maxFiles, u_signed64 maxBytes, std::queue<castor::tape::tapegateway::FileToMigrateStruct>& filesToMigrate) - throw (castor::exception::Exception){ + { // container for result should be clean! if (!filesToMigrate.empty()) { castor::exception::Exception ex; @@ -1095,7 +1095,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::getBulkFilesToRecall ( const std::string & context, u_signed64 mountTransactionId, u_signed64 maxFiles, u_signed64 maxBytes, std::queue<castor::tape::tapegateway::ITapeGatewaySvc::FileToRecallStructWithContext>& filesToRecall) - throw (castor::exception::Exception){ + { // container for result should be clean! if (!filesToRecall.empty()) { castor::exception::Exception ex; @@ -1191,7 +1191,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::setBulkFileMigrationResu const std::string & context, u_signed64 mountTransactionId, std::vector<FileMigratedNotificationStruct *>& successes, std::vector<FileErrorReportStruct *>& failures) -throw (castor::exception::Exception){ +{ try { if (!m_setBulkFileMigrationResult) { m_setBulkFileMigrationResult = @@ -1289,7 +1289,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::setBulkFileRecallResult const std::string & context, u_signed64 mountTransactionId, std::vector<FileRecalledNotificationStruct *>& successes, std::vector<FileErrorReportStruct *>& failures) -throw (castor::exception::Exception){ +{ try { if (!m_setBulkFileRecallResult) { m_setBulkFileRecallResult = @@ -1373,7 +1373,7 @@ throw (castor::exception::Exception){ //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::commit() - throw (castor::exception::Exception) + { cnvSvc()->commit(); } @@ -1383,7 +1383,7 @@ void castor::tape::tapegateway::ora::OraTapeGatewaySvc::commit() //---------------------------------------------------------------------------- void castor::tape::tapegateway::ora::OraTapeGatewaySvc::rollback() - throw (castor::exception::Exception) + { cnvSvc()->rollback(); } diff --git a/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.hpp b/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.hpp index 333bde942ecd7c23b69786be94dc5572f21cbf5e..5a2a9e1d052244f67f611ce7e35cf211272b13a8 100644 --- a/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.hpp +++ b/castor/tape/tapegateway/daemon/ora/OraTapeGatewaySvc.hpp @@ -56,24 +56,24 @@ namespace castor { virtual ~OraTapeGatewaySvc() throw(); virtual inline unsigned int id() const; static unsigned int ID(); - void reset() throw (); + void reset() throw(); public: // To get all the migration mount without a Tape associated to it virtual void getMigrationMountsWithoutTapes(std::list<castor::tape::tapegateway::ITapeGatewaySvc::migrationMountParameters>& migrationMounts) - throw (castor::exception::Exception); + ; // Find vdqm request Ids for migration mounts still referencing those tapes. virtual void getMigrationMountReqsForVids(const std::list<std::string>& vids, std::list<blockingSessionInfo>& blockingSessions) - throw (castor::exception::Exception); + ; // To create the db link between a Tape and a migrationMountParameters virtual void attachTapesToMigMounts(const std::list<u_signed64>& strIds, const std::list<std::string>& vids, const std::list<int>& fseqs) - throw (castor::exception::Exception); + ; /** get a tape for which a VDQM request si needed * @param vid a string filled with the VID of the selected tape @@ -84,7 +84,7 @@ namespace castor { virtual void getTapeWithoutDriveReq(std::string &vid, int &vdqmPriority, int &mode) - throw (castor::exception::Exception); + ; /** updates the db with the VDQM mountTransaction id * after we have sent a recall or migration request to VDQM @@ -100,7 +100,7 @@ namespace castor { const int mode, const char *label, const char *density) - throw (castor::exception::Exception); + ; /** To get the transactionids and vids of all ongoing recall or migrations * for which there should be a VDQM request @@ -110,29 +110,29 @@ namespace castor { */ virtual void getTapesWithDriveReqs(std::list<struct TapeRequest>& requests, const u_signed64& timeOut) - throw (castor::exception::Exception); + ; /** restarts requests lost by VDQM or a request which was processed * while the tapegateway was down * @param mountTransactionIds the transaction ids of the requests to be restarted */ virtual void restartLostReqs(const std::list<int>& mountTransactionIds) - throw (castor::exception::Exception); + ; // To get the tapecopies which faced a migration failure virtual void getFailedMigrations(std::list<castor::tape::tapegateway::RetryPolicyElement>& candidates) - throw (castor::exception::Exception); + ; // To update the db using the retry migration policy returned values virtual void setMigRetryResult(const std::list<u_signed64>& mjToRetry, const std::list<u_signed64>& mjToFail ) - throw (castor::exception::Exception); + ; // To update the database when the tapebridge allows // us to serve a request virtual void startTapeSession(const castor::tape::tapegateway::VolumeRequest& startReq, castor::tape::tapegateway::Volume& volume) - throw (castor::exception::Exception); + ; /** Ends a tape session by dropping it from the DB. If the tapebridge * comes afterwards asking for more data on the dropped session, it will @@ -144,7 +144,7 @@ namespace castor { */ virtual void endTapeSession(const u_signed64 mountTransactionId, const int errorCode = 0) - throw (castor::exception::Exception); + ; /** Ends a tape session by dropping it from the DB. If the tapebridge @@ -159,12 +159,12 @@ namespace castor { */ virtual void endTapeSessionAutonomous(const u_signed64 mountTransactionId, const int errorCode = 0) - throw (castor::exception::Exception); + ; // To get tapes to release in vmgr */ virtual void getTapeToRelease(const u_signed64& mountTransactionId, castor::tape::tapegateway::ITapeGatewaySvc::TapeToReleaseInfo& tape) - throw (castor::exception::Exception); + ; /** cancels a migration or recall for the given tape * @param mode the request mode (WRITE_DISABLE for Recalls, WRITE_ENABLE for Migrations) @@ -177,12 +177,12 @@ namespace castor { const std::string &vid, const int errorCode, const std::string &errorMsg) - throw (castor::exception::Exception); + ; // To delete migartion mounts with wrong tapepool virtual void deleteMigrationMountWithBadTapePool( const u_signed64 migrationMountId) - throw (castor::exception::Exception); + ; // Find the VID (and just it) for a migration mount. // This allows a safer update for the VMGR's fseq on this tape. @@ -195,7 +195,7 @@ namespace castor { // error so that we remember to make the tape as full at the end of // the session. Session is passed by VDQM request id (like for end/failSession). virtual void flagTapeFullForMigrationSession(const u_signed64& tapeRequestId) - throw (castor::exception::Exception); + ; /** * Get the next best files to migrate @@ -203,7 +203,7 @@ namespace castor { virtual void getBulkFilesToMigrate (const std::string & context, u_signed64 mountTransactionId, u_signed64 maxFiles, u_signed64 maxBytes, std::queue<castor::tape::tapegateway::FileToMigrateStruct>& filesToMigrate) - throw (castor::exception::Exception); + ; /** * Get the next best files to recall @@ -211,7 +211,7 @@ namespace castor { virtual void getBulkFilesToRecall (const std::string & context, u_signed64 mountTransactionId, u_signed64 maxFiles, u_signed64 maxBytes, std::queue<castor::tape::tapegateway::ITapeGatewaySvc::FileToRecallStructWithContext>& filesToRecall) - throw (castor::exception::Exception); + ; /** * Check and update the NS and then the stager DB accordingly from migration result @@ -221,7 +221,7 @@ namespace castor { const std::string & context, u_signed64 mountTransactionId, std::vector<FileMigratedNotificationStruct *>& successes, std::vector<FileErrorReportStruct *>& failures) - throw (castor::exception::Exception); + ; /** * Check the NS and update the stager DB accordingly for files from recall result @@ -231,15 +231,15 @@ namespace castor { const std::string & context, u_signed64 mountTransactionId, std::vector<FileRecalledNotificationStruct *>& successes, std::vector<FileErrorReportStruct *>& failures) - throw (castor::exception::Exception); + ; // To directly commit virtual void commit() - throw (castor::exception::Exception); + ; // To direcly rollback virtual void rollback() - throw (castor::exception::Exception); + ; private: @@ -272,7 +272,7 @@ namespace castor { public: // At construction time, extract the metadata from result set. // both STL and OCCI throw (sub classes of) std::exception. - resultSetIntrospector(oracle::occi::ResultSet *rs) throw (std::exception): m_rsStruct(rs->getColumnListMetaData()){} + resultSetIntrospector(oracle::occi::ResultSet *rs) : m_rsStruct(rs->getColumnListMetaData()){} // Trivial destructor. virtual ~resultSetIntrospector() {}; // Look for a given column in the metadata array. diff --git a/castor/tape/tapeserver/SCSI/Structures.hpp b/castor/tape/tapeserver/SCSI/Structures.hpp index 3efc443fdcc8db52de860fdd459f291819d25e55..aa0029e3fadaa2694e1ed241f4d2d367cbec84af 100644 --- a/castor/tape/tapeserver/SCSI/Structures.hpp +++ b/castor/tape/tapeserver/SCSI/Structures.hpp @@ -75,7 +75,7 @@ namespace SCSI { void setCDB(T * cdb) { cmdp = (unsigned char *)cdb; cmd_len = sizeof(T); } template <typename T> - void setSenseBuffer(T * senseBuff) throw (Exception) + void setSenseBuffer(T * senseBuff) { if (sizeof(T) > UCHAR_MAX) throw Exception("sense structure too big in LinuxSGIO_t::setSense"); @@ -712,7 +712,7 @@ namespace SCSI { * length in bytes (as found in the struct) in a parameter count. * @return number of parameters. */ - unsigned int parameterNumber() throw (Exception) { + unsigned int parameterNumber() { unsigned int numFromLength = SCSI::Structures::toU16(pageLength) / sizeof (tapeAlertLogParameter_t); return numFromLength; } diff --git a/castor/tape/tapeserver/client/ClientSimSingleReply.hpp b/castor/tape/tapeserver/client/ClientSimSingleReply.hpp index 8aaf37f2fcfec35a2045e910a35bab886c7b6515..65e97dcd77004a0eac391c94d1b5c74b974dca60 100644 --- a/castor/tape/tapeserver/client/ClientSimSingleReply.hpp +++ b/castor/tape/tapeserver/client/ClientSimSingleReply.hpp @@ -54,7 +54,7 @@ namespace client { setupCallbackSock(); } - virtual ~ClientSimSingleReply() throw () {} + virtual ~ClientSimSingleReply() throw() {} struct ipPort { ipPort(uint32_t i, uint16_t p): ip(i), port(p) {} @@ -86,31 +86,31 @@ namespace client { protected: // Place holders for pure virtual members of TpcpCommand we don't // use in the simulator - virtual void usage(std::ostream &) const throw () {} + virtual void usage(std::ostream &) const throw() {} virtual void parseCommandLine(const int, char **) - throw(castor::exception::Exception) {} + {} virtual void checkAccessToDisk() - const throw(castor::exception::Exception) {} + const {} virtual void checkAccessToTape() - const throw(castor::exception::Exception) {} + const {} virtual void requestDriveFromVdqm(char *const) - throw(castor::exception::Exception) {} - virtual void performTransfer() throw(castor::exception::Exception) {} + {} + virtual void performTransfer() {} // The functions we actually implement in the simulator virtual void sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception) {} + const {} virtual bool dispatchMsgHandler(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception) { + castor::io::AbstractSocket &sock) { return false; } private: // Process the first request which should be getVolume - void processFirstRequest() throw(castor::exception::Exception) { + void processFirstRequest() { // Accept the next connection std::auto_ptr<castor::io::ServerSocket> clientConnection(m_callbackSock.accept()); // Read in the message sent by the tapebridge @@ -144,7 +144,7 @@ namespace client { */ template<> void ClientSimSingleReply<castor::tape::tapegateway::FilesToMigrateList>::processFirstRequest() - throw(castor::exception::Exception) { + { using namespace castor::tape::tapegateway; // Accept the next connection std::auto_ptr<castor::io::ServerSocket> clientConnection(m_callbackSock.accept()); @@ -168,7 +168,7 @@ namespace client { */ template<> void ClientSimSingleReply<castor::tape::tapegateway::FilesToRecallList>::processFirstRequest() - throw(castor::exception::Exception) { + { using namespace castor::tape::tapegateway; // Accept the next connection std::auto_ptr<castor::io::ServerSocket> clientConnection(m_callbackSock.accept()); diff --git a/castor/tape/tapeserver/client/ClientSimulator.cpp b/castor/tape/tapeserver/client/ClientSimulator.cpp index d7ac91a6ed6b84a350376a5341caea38e2b7e2a6..b59bebfa33eccbd33c9b21813e5220115f7fb4a5 100644 --- a/castor/tape/tapeserver/client/ClientSimulator.cpp +++ b/castor/tape/tapeserver/client/ClientSimulator.cpp @@ -62,7 +62,7 @@ ClientSimulator::ClientSimulator(uint32_t volReqId, const std::string & vid, //processFirstRequest //------------------------------------------------------------------------------ void ClientSimulator::processFirstRequest() -throw (castor::exception::Exception) { + { // Accept the next connection std::auto_ptr<castor::io::ServerSocket> clientConnection(m_callbackSock.accept()); // Read in the message sent by the tapebridge @@ -111,7 +111,7 @@ throw (castor::exception::Exception) { //processOneRequest //------------------------------------------------------------------------------ bool ClientSimulator::processOneRequest() -throw (castor::exception::Exception) { + { // Accept the next connection std::auto_ptr<castor::io::ServerSocket> clientConnection(m_callbackSock.accept()); // Read in the message sent by the tapebridge @@ -269,7 +269,7 @@ void ClientSimulator::sendEndNotificationErrorReport( const int errorCode, const std::string &errorMessage, castor::io::AbstractSocket &sock) -throw () { +throw() { tapegateway::EndNotificationErrorReport err; err.setAggregatorTransactionId(tapebridgeTransactionId); err.setErrorCode(errorCode); diff --git a/castor/tape/tapeserver/client/ClientSimulator.hpp b/castor/tape/tapeserver/client/ClientSimulator.hpp index 0d5d04fdd385b78b5169737e2ecf01526b62d585..3722751b5199efeb70cecbff00fbf9cbf9c8c964 100644 --- a/castor/tape/tapeserver/client/ClientSimulator.hpp +++ b/castor/tape/tapeserver/client/ClientSimulator.hpp @@ -45,7 +45,7 @@ namespace client { const std::string & density, tapegateway::ClientType clientType, tapegateway::VolumeMode volumeMode); - virtual ~ClientSimulator() throw () {} + virtual ~ClientSimulator() throw() {} struct ipPort { ipPort(uint32_t i, uint16_t p): ip(i), port(p) {} @@ -90,35 +90,35 @@ namespace client { protected: // Place holders for pure virtual members of TpcpCommand we don't // use in the simulator - virtual void usage(std::ostream &) const throw () {} + virtual void usage(std::ostream &) const throw() {} virtual void parseCommandLine(const int, char **) - throw(castor::exception::Exception) {} + {} virtual void checkAccessToDisk() - const throw(castor::exception::Exception) {} + const {} virtual void checkAccessToTape() - const throw(castor::exception::Exception) {} + const {} virtual void requestDriveFromVdqm(char *const) - throw(castor::exception::Exception) {} - virtual void performTransfer() throw(castor::exception::Exception) {} + {} + virtual void performTransfer() {} // The functions we actually implement in the simulator virtual void sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception) {} + const {} virtual bool dispatchMsgHandler(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception) { + castor::io::AbstractSocket &sock) { return false; } private: // Process the first request which should be getVolume - void processFirstRequest() throw(castor::exception::Exception); + void processFirstRequest() ; // Process requests (recall or migration) until we receive and end of session // This helper function will process one request and return true if there is // still more to process (that is if the end session is not signaled yet) - bool processOneRequest() throw(castor::exception::Exception); + bool processOneRequest() ; // Notify the client void sendEndNotificationErrorReport( const uint64_t tapebridgeTransactionId, diff --git a/castor/tape/tapeserver/client/FakeClient.hpp b/castor/tape/tapeserver/client/FakeClient.hpp index 98271b0df591f985f6e564e6d32a906a7781ed79..433bc537e9618b82c8e7756cf51e69ee85807af9 100644 --- a/castor/tape/tapeserver/client/FakeClient.hpp +++ b/castor/tape/tapeserver/client/FakeClient.hpp @@ -45,11 +45,11 @@ public: lists.push_back(NULL); } virtual void reportMigrationResults(tapegateway::FileMigrationReportList & migrationReport, - RequestReport& report) throw (castor::tape::Exception){ + RequestReport& report) { } virtual void reportRecallResults(tapegateway::FileRecallReportList & recallReport, - RequestReport& report) throw (castor::tape::Exception){ + RequestReport& report) { } tapegateway::FilesToMigrateList *getFilesToMigrate(uint64_t files, uint64_t bytes, RequestReport &report){ @@ -60,7 +60,7 @@ public: void assertion(){ASSERT_EQ(true,static_cast<unsigned int>(m_current)<lists.size());} virtual tapegateway::FilesToRecallList * getFilesToRecall(uint64_t files, - uint64_t bytes, RequestReport &report) throw (castor::tape::Exception) + uint64_t bytes, RequestReport &report) { report.transactionId=666; @@ -72,10 +72,10 @@ public: } virtual void reportEndOfSessionWithError(const std::string & errorMsg, int errorCode, - RequestReport &transactionReport) throw (castor::tape::Exception) { + RequestReport &transactionReport) { }; - virtual void reportEndOfSession(RequestReport &report) throw (Exception) {} + virtual void reportEndOfSession(RequestReport &report) {} private: std::vector<tapegateway::FilesToRecallList*> lists; int m_current; diff --git a/castor/tape/tapeserver/daemon/AdminAcceptHandler.cpp b/castor/tape/tapeserver/daemon/AdminAcceptHandler.cpp index 279d4f01d93c087f06fc3a224390ff8264ccfd73..0235d3648df1b18999de330b51b6e3c88fb6af08 100644 --- a/castor/tape/tapeserver/daemon/AdminAcceptHandler.cpp +++ b/castor/tape/tapeserver/daemon/AdminAcceptHandler.cpp @@ -92,7 +92,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::fillPollFd( //----------------------------------------------------------------------------- size_t castor::tape::tapeserver::daemon::AdminAcceptHandler::marshalTapeRcReplyMsg(char *const dst, const size_t dstLen, const int rc) - throw(castor::exception::Exception) { + { legacymsg::MessageHeader src; src.magic = TPMAGIC; src.reqType = TAPERC; @@ -103,7 +103,7 @@ size_t castor::tape::tapeserver::daemon::AdminAcceptHandler::marshalTapeRcReplyM //------------------------------------------------------------------------------ // writeTapeConfigReplyMsg //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::AdminAcceptHandler::writeTapeRcReplyMsg(const int fd, const int rc) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::AdminAcceptHandler::writeTapeRcReplyMsg(const int fd, const int rc) { char buf[REPBUFSZ]; const size_t len = marshalTapeRcReplyMsg(buf, sizeof(buf), rc); try { @@ -119,7 +119,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::writeTapeRcReplyMsg(c //------------------------------------------------------------------------------ // writeTapeStatReplyMsg //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::AdminAcceptHandler::writeTapeStatReplyMsg(const int fd) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::AdminAcceptHandler::writeTapeStatReplyMsg(const int fd) { legacymsg::TapeStatReplyMsgBody body; const std::list<std::string> unitNames = m_driveCatalogue.getUnitNames(); @@ -152,7 +152,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::writeTapeStatReplyMsg //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::AdminAcceptHandler::fillTapeStatDriveEntry( legacymsg::TapeStatDriveEntry &entry, const std::string &unitName) - throw (castor::exception::Exception) { + { // If there is no process ID available then just put 0 try { entry.jid = m_driveCatalogue.getSessionPid(unitName); @@ -188,7 +188,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::fillTapeStatDriveEntr // driveStateToStatEntryUp //------------------------------------------------------------------------------ uint16_t castor::tape::tapeserver::daemon::AdminAcceptHandler::driveStateToStatEntryUp( - const DriveCatalogue::DriveState state) throw(castor::exception::Exception) { + const DriveCatalogue::DriveState state) { switch(state) { case DriveCatalogue::DRIVE_STATE_INIT: case DriveCatalogue::DRIVE_STATE_DOWN: @@ -216,7 +216,7 @@ uint16_t castor::tape::tapeserver::daemon::AdminAcceptHandler::driveStateToStatE // driveStateToStatEntryAsn //------------------------------------------------------------------------------ uint16_t castor::tape::tapeserver::daemon::AdminAcceptHandler::driveStateToStatEntryAsn( - const DriveCatalogue::DriveState state) throw(castor::exception::Exception) { + const DriveCatalogue::DriveState state) { switch(state) { case DriveCatalogue::DRIVE_STATE_INIT: case DriveCatalogue::DRIVE_STATE_DOWN: @@ -242,7 +242,7 @@ uint16_t castor::tape::tapeserver::daemon::AdminAcceptHandler::driveStateToStatE // handleEvent //------------------------------------------------------------------------------ bool castor::tape::tapeserver::daemon::AdminAcceptHandler::handleEvent( - const struct pollfd &fd) throw(castor::exception::Exception) { + const struct pollfd &fd) { checkHandleEventFd(fd.fd); // Do nothing if there is no data to read @@ -274,7 +274,7 @@ bool castor::tape::tapeserver::daemon::AdminAcceptHandler::handleEvent( // checkHandleEventFd //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::AdminAcceptHandler::checkHandleEventFd( - const int fd) throw (castor::exception::Exception) { + const int fd) { if(m_fd != fd) { castor::exception::Exception ex; ex.getMessage() << "Failed to accept connection from the admin command" @@ -314,7 +314,7 @@ void // handleTapeConfigJob //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::AdminAcceptHandler::handleTapeConfigJob( - const legacymsg::TapeConfigRequestMsgBody &body) throw(castor::exception::Exception) { + const legacymsg::TapeConfigRequestMsgBody &body) { const std::string unitName(body.drive); const std::string dgn = m_driveCatalogue.getDgn(unitName); @@ -347,7 +347,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::handleTapeConfigJob( //------------------------------------------------------------------------------ // handleTapeStatJob //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::AdminAcceptHandler::handleTapeStatJob(const legacymsg::TapeStatRequestMsgBody &body) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::AdminAcceptHandler::handleTapeStatJob(const legacymsg::TapeStatRequestMsgBody &body) { } @@ -355,7 +355,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::handleTapeStatJob(con // dispatchJob //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::AdminAcceptHandler::dispatchJob( - const int connection) throw(castor::exception::Exception) { + const int connection) { const legacymsg::MessageHeader header = readJobMsgHeader(connection); if(TPCONF == header.reqType) { @@ -378,7 +378,7 @@ void castor::tape::tapeserver::daemon::AdminAcceptHandler::dispatchJob( //------------------------------------------------------------------------------ castor::legacymsg::MessageHeader castor::tape::tapeserver::daemon::AdminAcceptHandler::readJobMsgHeader( - const int connection) throw(castor::exception::Exception) { + const int connection) { // Read in the message header char buf[3 * sizeof(uint32_t)]; // magic + request type + len io::readBytes(connection, m_netTimeout, sizeof(buf), buf); @@ -417,7 +417,7 @@ castor::legacymsg::MessageHeader castor::legacymsg::TapeConfigRequestMsgBody castor::tape::tapeserver::daemon::AdminAcceptHandler::readTapeConfigMsgBody( const int connection, const uint32_t len) - throw(castor::exception::Exception) { + { char buf[REQBUFSZ]; if(sizeof(buf) < len) { @@ -450,7 +450,7 @@ castor::legacymsg::TapeConfigRequestMsgBody castor::legacymsg::TapeStatRequestMsgBody castor::tape::tapeserver::daemon::AdminAcceptHandler::readTapeStatMsgBody( const int connection, const uint32_t len) - throw(castor::exception::Exception) { + { char buf[REQBUFSZ]; if(sizeof(buf) < len) { diff --git a/castor/tape/tapeserver/daemon/AdminAcceptHandler.hpp b/castor/tape/tapeserver/daemon/AdminAcceptHandler.hpp index 640400919cf7d74cfc4b302936e0aa47d17c0881..a9c20e935536ba5cc154eeccb9ca186fbf4a20a7 100644 --- a/castor/tape/tapeserver/daemon/AdminAcceptHandler.hpp +++ b/castor/tape/tapeserver/daemon/AdminAcceptHandler.hpp @@ -86,7 +86,7 @@ public: * the reactor. */ bool handleEvent(const struct pollfd &fd) - throw(castor::exception::Exception); + ; /** * Destructor. @@ -105,7 +105,7 @@ private: * @return The total length of the header. */ size_t marshalTapeRcReplyMsg(char *const dst, const size_t dstLen, - const int rc) throw(castor::exception::Exception); + const int rc) ; /** * Writes a job reply message to the tape config command connection. @@ -115,7 +115,7 @@ private: * */ void writeTapeRcReplyMsg(const int fd, const int rc) - throw(castor::exception::Exception); + ; /** * Writes a reply message to the tape stat command connection. @@ -125,7 +125,7 @@ private: * */ void writeTapeStatReplyMsg(const int fd) - throw(castor::exception::Exception); + ; /** * Fills the specified TapeStatDriveEntry with the information correpsonding @@ -135,7 +135,7 @@ private: * @param unitName The unit name of the tape drive. */ void fillTapeStatDriveEntry(legacymsg::TapeStatDriveEntry &entry, - const std::string &unitName) throw (castor::exception::Exception); + const std::string &unitName) ; /** * Translates the specified tape-drive state into the corresponding value for @@ -145,7 +145,7 @@ private: * @return The translated value. */ uint16_t driveStateToStatEntryUp(const DriveCatalogue::DriveState state) - throw(castor::exception::Exception); + ; /** * Translates the specified tape-drive state into the corresponding value for @@ -155,13 +155,13 @@ private: * @return The translated value. */ uint16_t driveStateToStatEntryAsn(const DriveCatalogue::DriveState state) - throw(castor::exception::Exception); + ; /** * Throws an exception if the specified file-descriptor is not that of the * socket listening for connections from the vdqmd daemon. */ - void checkHandleEventFd(const int fd) throw (castor::exception::Exception); + void checkHandleEventFd(const int fd) ; /** * Logs the reception of the specified job message from the tpconfig command. @@ -180,7 +180,7 @@ private: * @param body body of the tape stat message */ void handleTapeStatJob(const legacymsg::TapeStatRequestMsgBody &body) - throw(castor::exception::Exception); + ; /** * Carries out the required drive configuration and replies properly to the client @@ -188,7 +188,7 @@ private: * @param body body of the tape config message */ void handleTapeConfigJob(const legacymsg::TapeConfigRequestMsgBody &body) - throw(castor::exception::Exception); + ; /** * Reads a job type from the specified connection, dispatches the job to the @@ -196,7 +196,7 @@ private: * * @param connection The file descriptor of the connection with admin command */ - void dispatchJob(const int connection) throw(castor::exception::Exception); + void dispatchJob(const int connection) ; /** * Reads the header of a job message from the specified connection. @@ -206,7 +206,7 @@ private: * @return The message header. */ legacymsg::MessageHeader readJobMsgHeader(const int connection) - throw(castor::exception::Exception); + ; /** * Reads the body of a job message from the specified connection. @@ -216,7 +216,7 @@ private: * @return The message body. */ legacymsg::TapeConfigRequestMsgBody readTapeConfigMsgBody(const int connection, - const uint32_t len) throw(castor::exception::Exception); + const uint32_t len) ; /** * Reads the body of a job message from the specified connection. @@ -226,7 +226,7 @@ private: * @return The message body. */ legacymsg::TapeStatRequestMsgBody readTapeStatMsgBody(const int connection, - const uint32_t len) throw(castor::exception::Exception); + const uint32_t len) ; /** * The file descriptor of the socket listening for connections from the vdqmd diff --git a/castor/tape/tapeserver/daemon/DebugMountSessionForVdqmProtocol.cpp b/castor/tape/tapeserver/daemon/DebugMountSessionForVdqmProtocol.cpp index 3e9bdd7c42ddbd1c3c4d025578e21076f06eb549..80a0ef1a48f294e59196fcccc2bb2d27f3ee346d 100644 --- a/castor/tape/tapeserver/daemon/DebugMountSessionForVdqmProtocol.cpp +++ b/castor/tape/tapeserver/daemon/DebugMountSessionForVdqmProtocol.cpp @@ -68,7 +68,7 @@ castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::DebugMountSe //------------------------------------------------------------------------------ // execute //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::execute() throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::execute() { changeProcessName(); assignSessionPidToDrive(); @@ -126,14 +126,14 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::changeP //------------------------------------------------------------------------------ // assignSessionPidToDrive //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::assignSessionPidToDrive() throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::assignSessionPidToDrive() { m_vdqm.assignDrive(m_hostName, m_job.driveUnit, m_job.dgn, m_job.volReqId, m_sessionPid); } //------------------------------------------------------------------------------ // getVolume //------------------------------------------------------------------------------ -castor::tape::tapegateway::Volume *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::getVolume(const uint64_t clientMsgSeqNb) const throw(castor::exception::Exception) { +castor::tape::tapegateway::Volume *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::getVolume(const uint64_t clientMsgSeqNb) const { // Prepare the request tapegateway::VolumeRequest request; request.setMountTransactionId(m_job.volReqId); @@ -215,7 +215,7 @@ castor::tape::tapegateway::Volume *castor::tape::tapeserver::daemon::DebugMountS //----------------------------------------------------------------------------- // connectSendRequestAndReceiveReply //----------------------------------------------------------------------------- -castor::IObject *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::connectSendRequestAndReceiveReply(const char *const requestTypeName, IObject &request) const throw(castor::exception::Exception) { +castor::IObject *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::connectSendRequestAndReceiveReply(const char *const requestTypeName, IObject &request) const { const int clientSock = io::connectWithTimeout(m_job.clientHost, m_job.clientPort, m_netTimeout); castor::io::ClientSocket sock(clientSock); sock.setTimeout(m_netTimeout); @@ -271,7 +271,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::checkTr const uint32_t actualMountTransactionId, const uint64_t expectedTapebridgeTransId, const uint64_t actualTapebridgeTransId) const - throw(castor::exception::Exception) { + { int nbErrors = 0; castor::exception::Exception ex; @@ -302,7 +302,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::checkTr //----------------------------------------------------------------------------- // throwEndNotificationErrorReport //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::throwEndNotificationErrorReport(IObject *const obj) const throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::throwEndNotificationErrorReport(IObject *const obj) const { // Down cast the reply to its specific class tapegateway::EndNotificationErrorReport *reply = @@ -323,7 +323,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::throwEn //------------------------------------------------------------------------------ // mountTape //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::mountTape(const std::string &vid) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::mountTape(const std::string &vid) { const std::string drive = getLibrarySlot(m_job.driveUnit); m_rmc.mountTape(vid, drive); @@ -338,7 +338,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::mountTa // getLibrarySlot //------------------------------------------------------------------------------ std::string castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::getLibrarySlot(const std::string &unitName) - throw (castor::exception::Exception) { + { for(utils::TpconfigLines::const_iterator itor = m_tpConfig.begin(); itor != m_tpConfig.end(); itor++) { if(unitName == itor->unitName) { return itor->librarySlot; @@ -353,7 +353,7 @@ std::string castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol:: //------------------------------------------------------------------------------ // transferFiles //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::transferFiles(tapegateway::Volume &volume, uint64_t &clientMsgSeqNb) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::transferFiles(tapegateway::Volume &volume, uint64_t &clientMsgSeqNb) { switch(volume.mode()) { case tapegateway::READ: recallFiles(volume.vid(), clientMsgSeqNb); @@ -376,7 +376,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::transfe //------------------------------------------------------------------------------ // recallFiles //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::recallFiles(const std::string &vid, uint64_t &clientMsgSeqNb) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::recallFiles(const std::string &vid, uint64_t &clientMsgSeqNb) { log::Param params[] = { log::Param("unitName", m_job.driveUnit), log::Param("TPVID", vid)}; @@ -416,7 +416,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::recallF //------------------------------------------------------------------------------ // migrateFiles //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::migrateFiles(const std::string &vid, uint64_t &clientMsgSeqNb) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::migrateFiles(const std::string &vid, uint64_t &clientMsgSeqNb) { log::Param params[] = { log::Param("unitName", m_job.driveUnit), log::Param("TPVID", vid)}; @@ -432,7 +432,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::migrate //------------------------------------------------------------------------------ // dumpFiles //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::dumpFiles(const std::string &vid) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::dumpFiles(const std::string &vid) { log::Param params[] = { log::Param("unitName", m_job.driveUnit), log::Param("TPVID", vid)}; @@ -448,7 +448,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::dumpFil //------------------------------------------------------------------------------ // releaseDrive //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::releaseDrive(const bool forceUnmount) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::releaseDrive(const bool forceUnmount) { log::Param params[] = { log::Param("unitName", m_job.driveUnit), log::Param("forceUnmount", forceUnmount)}; @@ -460,7 +460,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::release //------------------------------------------------------------------------------ // unmountTape //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::unmountTape(const std::string &vid) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::unmountTape(const std::string &vid) { const std::string librarySlot = getLibrarySlot(m_job.driveUnit); m_rmc.unmountTape(vid, librarySlot); @@ -474,7 +474,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::unmount //----------------------------------------------------------------------------- // getFilesToRecall //----------------------------------------------------------------------------- -castor::tape::tapegateway::FilesToRecallList *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::getFilesToRecall(const uint64_t clientMsgSeqNb, const uint64_t maxFiles, const uint64_t maxBytes) const throw(castor::exception::Exception) { +castor::tape::tapegateway::FilesToRecallList *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::getFilesToRecall(const uint64_t clientMsgSeqNb, const uint64_t maxFiles, const uint64_t maxBytes) const { const int clientSock = sendFilesToRecallListRequest(clientMsgSeqNb, maxFiles, maxBytes); tapegateway::FilesToRecallList *const fileList = receiveFilesToRecallListRequestReplyAndClose(clientMsgSeqNb, clientSock); return fileList; @@ -483,7 +483,7 @@ castor::tape::tapegateway::FilesToRecallList *castor::tape::tapeserver::daemon:: //----------------------------------------------------------------------------- // sendFilesToRecallListRequest //----------------------------------------------------------------------------- -int castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::sendFilesToRecallListRequest(const uint64_t clientMsgSeqNb, const uint64_t maxFiles, const uint64_t maxBytes) const throw(castor::exception::Exception) { +int castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::sendFilesToRecallListRequest(const uint64_t clientMsgSeqNb, const uint64_t maxFiles, const uint64_t maxBytes) const { // Check method arguments if(maxFiles == 0) { @@ -521,7 +521,7 @@ int castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::sendFile //----------------------------------------------------------------------------- // connectAndSendMessage //----------------------------------------------------------------------------- -int castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::connectAndSendMessage(IObject &message) const throw(castor::exception::Exception) { +int castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::connectAndSendMessage(IObject &message) const { const int clientSock = io::connectWithTimeout(m_job.clientHost, m_job.clientPort, m_netTimeout); castor::io::ClientSocket sock(clientSock); sock.setTimeout(m_netTimeout); @@ -552,7 +552,7 @@ int castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::connectA //----------------------------------------------------------------------------- // receiveFilesToRecallListRequestReplyAndClose //----------------------------------------------------------------------------- -castor::tape::tapegateway::FilesToRecallList *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::receiveFilesToRecallListRequestReplyAndClose(const uint64_t clientMsgSeqNb, const int clientSock) const throw(castor::exception::Exception) { +castor::tape::tapegateway::FilesToRecallList *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::receiveFilesToRecallListRequestReplyAndClose(const uint64_t clientMsgSeqNb, const int clientSock) const { const char *const task = "receive reply to FilesToRecallListRequest and close connection"; std::auto_ptr<castor::IObject> obj; @@ -635,7 +635,7 @@ castor::tape::tapegateway::FilesToRecallList *castor::tape::tapeserver::daemon:: //----------------------------------------------------------------------------- // receiveReplyAndClose //----------------------------------------------------------------------------- -castor::IObject *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::receiveReplyAndClose(const int clientSock) const throw(castor::exception::Exception) { +castor::IObject *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::receiveReplyAndClose(const int clientSock) const { const char *const task = "receive reply and close connection"; // Receive the reply object castor::io::AbstractTCPSocket sock(clientSock); @@ -669,7 +669,7 @@ castor::IObject *castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProto //----------------------------------------------------------------------------- // notifyEndOfSession //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::notifyEndOfSession(const uint64_t clientMsgSeqNb) const throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::notifyEndOfSession(const uint64_t clientMsgSeqNb) const { // Prepare the request tapegateway::EndNotification request; @@ -687,7 +687,7 @@ void castor::tape::tapeserver::daemon::DebugMountSessionForVdqmProtocol::notifyC const uint64_t clientMsgSeqNb, const char *const requestTypeName, IObject& request) const - throw(castor::exception::Exception) { + { // Send the request and receive the reply std::auto_ptr<castor::IObject> obj(connectSendRequestAndReceiveReply(requestTypeName, request)); diff --git a/castor/tape/tapeserver/daemon/DriveCatalogue.cpp b/castor/tape/tapeserver/daemon/DriveCatalogue.cpp index 86b332366935261f80d35bb4c704aa4ed5c98271..c6d795db422919b05ccb867e5e79436ef326293b 100644 --- a/castor/tape/tapeserver/daemon/DriveCatalogue.cpp +++ b/castor/tape/tapeserver/daemon/DriveCatalogue.cpp @@ -62,7 +62,7 @@ const char *castor::tape::tapeserver::daemon::DriveCatalogue::sessionType2Str( // populateCatalogue //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::populateCatalogue( - const utils::TpconfigLines &lines) throw(castor::exception::Exception) { + const utils::TpconfigLines &lines) { // Enter each TPCONFIG line into the catalogue for(utils::TpconfigLines::const_iterator itor = lines.begin(); @@ -75,7 +75,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::populateCatalogue( // enterTpconfigLine //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::enterTpconfigLine( - const utils::TpconfigLine &line) throw(castor::exception::Exception) { + const utils::TpconfigLine &line) { DriveMap::iterator itor = m_drives.find(line.unitName); @@ -107,7 +107,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::enterTpconfigLine( //----------------------------------------------------------------------------- castor::tape::tapeserver::daemon::DriveCatalogue::DriveState castor::tape::tapeserver::daemon::DriveCatalogue::str2InitialState( - const std::string &initialState) const throw(castor::exception::Exception) { + const std::string &initialState) const { std::string upperCaseInitialState = initialState; castor::utils::toUpper(upperCaseInitialState); @@ -130,7 +130,7 @@ castor::tape::tapeserver::daemon::DriveCatalogue::DriveState //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::checkTpconfigLine( const DriveEntry &catalogueEntry, const utils::TpconfigLine &line) - throw(castor::exception::Exception) { + { checkTpconfigLineDgn(catalogueEntry.dgn, line); checkTpconfigLineDevFilename(catalogueEntry.devFilename, line); checkTpconfigLineDensity(catalogueEntry.densities, line); @@ -144,7 +144,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::checkTpconfigLine( //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::checkTpconfigLineDgn( const std::string &catalogueDgn, const utils::TpconfigLine &line) - throw(castor::exception::Exception) { + { if(catalogueDgn != line.dgn) { castor::exception::Exception ex; ex.getMessage() << "Invalid TPCONFIG line" @@ -159,7 +159,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::checkTpconfigLineDgn( //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue:: checkTpconfigLineDevFilename(const std::string &catalogueDevFilename, - const utils::TpconfigLine &line) throw(castor::exception::Exception) { + const utils::TpconfigLine &line) { if(catalogueDevFilename != line.devFilename) { castor::exception::Exception ex; ex.getMessage() << "Invalid TPCONFIG line" @@ -175,7 +175,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue:: //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::checkTpconfigLineDensity( const std::list<std::string> &catalogueDensities, - const utils::TpconfigLine &line) throw(castor::exception::Exception) { + const utils::TpconfigLine &line) { for(std::list<std::string>::const_iterator itor = catalogueDensities.begin(); itor != catalogueDensities.end(); itor++) { if((*itor) == line.density) { @@ -193,7 +193,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::checkTpconfigLineDensity( //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue:: checkTpconfigLineInitialState(const DriveState catalogueInitialState, - const utils::TpconfigLine &line) throw(castor::exception::Exception) { + const utils::TpconfigLine &line) { if(catalogueInitialState != str2InitialState(line.initialState)) { castor::exception::Exception ex; ex.getMessage() << "Invalid TPCONFIG line" @@ -210,7 +210,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue:: void castor::tape::tapeserver::daemon::DriveCatalogue:: checkTpconfigLineLibrarySlot( const std::string &catalogueLibrarySlot, - const utils::TpconfigLine &line) throw(castor::exception::Exception) { + const utils::TpconfigLine &line) { if(catalogueLibrarySlot != line.librarySlot) { castor::exception::Exception ex; ex.getMessage() << "Invalid TPCONFIG line" @@ -226,7 +226,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue:: //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue:: checkTpconfigLineDevType(const std::string &catalogueDevType, - const utils::TpconfigLine &line) throw(castor::exception::Exception) { + const utils::TpconfigLine &line) { if(catalogueDevType != line.devType) { castor::exception::Exception ex; ex.getMessage() << "Invalid TPCONFIG line" @@ -241,7 +241,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue:: // getUnitName //----------------------------------------------------------------------------- std::string castor::tape::tapeserver::daemon::DriveCatalogue::getUnitName( - const pid_t sessionPid) const throw(castor::exception::Exception) { + const pid_t sessionPid) const { for(DriveMap::const_iterator i = m_drives.begin(); i!=m_drives.end(); i++) { if(sessionPid == i->second.sessionPid) return i->first; @@ -255,7 +255,7 @@ std::string castor::tape::tapeserver::daemon::DriveCatalogue::getUnitName( //----------------------------------------------------------------------------- // getUnitNames //----------------------------------------------------------------------------- -std::list<std::string> castor::tape::tapeserver::daemon::DriveCatalogue::getUnitNames() const throw(castor::exception::Exception) { +std::list<std::string> castor::tape::tapeserver::daemon::DriveCatalogue::getUnitNames() const { std::list<std::string> unitNames; for(DriveMap::const_iterator itor = m_drives.begin(); @@ -269,7 +269,7 @@ std::list<std::string> castor::tape::tapeserver::daemon::DriveCatalogue::getUnit //----------------------------------------------------------------------------- // getUnitNames //----------------------------------------------------------------------------- -std::list<std::string> castor::tape::tapeserver::daemon::DriveCatalogue::getUnitNames(const DriveState state) const throw(castor::exception::Exception) { +std::list<std::string> castor::tape::tapeserver::daemon::DriveCatalogue::getUnitNames(const DriveState state) const { std::list<std::string> unitNames; for(DriveMap::const_iterator itor = m_drives.begin(); @@ -286,7 +286,7 @@ std::list<std::string> castor::tape::tapeserver::daemon::DriveCatalogue::getUnit // getDgn //----------------------------------------------------------------------------- const std::string &castor::tape::tapeserver::daemon::DriveCatalogue::getDgn( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -302,7 +302,7 @@ const std::string &castor::tape::tapeserver::daemon::DriveCatalogue::getDgn( // getVid //----------------------------------------------------------------------------- const std::string &castor::tape::tapeserver::daemon::DriveCatalogue::getVid( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -318,7 +318,7 @@ const std::string &castor::tape::tapeserver::daemon::DriveCatalogue::getVid( // getAssignmentTime //----------------------------------------------------------------------------- time_t castor::tape::tapeserver::daemon::DriveCatalogue::getAssignmentTime( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -335,7 +335,7 @@ time_t castor::tape::tapeserver::daemon::DriveCatalogue::getAssignmentTime( //----------------------------------------------------------------------------- const std::string &castor::tape::tapeserver::daemon::DriveCatalogue::getDevFilename( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -352,7 +352,7 @@ const std::string //----------------------------------------------------------------------------- const std::list<std::string> &castor::tape::tapeserver::daemon::DriveCatalogue::getDensities( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -369,7 +369,7 @@ const std::list<std::string> //----------------------------------------------------------------------------- castor::tape::tapeserver::daemon::DriveCatalogue::SessionType castor::tape::tapeserver::daemon::DriveCatalogue::getSessionType( - const pid_t sessionPid) const throw(castor::exception::Exception) { + const pid_t sessionPid) const { std::ostringstream task; task << "get the type of the session with pid " << sessionPid; @@ -398,7 +398,7 @@ castor::tape::tapeserver::daemon::DriveCatalogue::SessionType //----------------------------------------------------------------------------- castor::tape::tapeserver::daemon::DriveCatalogue::DriveState castor::tape::tapeserver::daemon::DriveCatalogue::getState( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -415,7 +415,7 @@ castor::tape::tapeserver::daemon::DriveCatalogue::DriveState //----------------------------------------------------------------------------- const std::string & castor::tape::tapeserver::daemon::DriveCatalogue::getLibrarySlot( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -432,7 +432,7 @@ const std::string & //----------------------------------------------------------------------------- const std::string & castor::tape::tapeserver::daemon::DriveCatalogue::getDevType( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { DriveMap::const_iterator itor = m_drives.find(unitName); if(m_drives.end() == itor) { castor::exception::Exception ex; @@ -449,7 +449,7 @@ const std::string & //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::updateVidAssignment( const std::string &vid, const std::string &unitName) - throw(castor::exception::Exception) { + { std::ostringstream task; task << "update the VID of tape drive " << unitName; @@ -468,7 +468,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::updateVidAssignment( // getLabelCmdConnection //----------------------------------------------------------------------------- int castor::tape::tapeserver::daemon::DriveCatalogue::getLabelCmdConnection( - const pid_t sessionPid) throw(castor::exception::Exception) { + const pid_t sessionPid) { std::ostringstream task; task << "get the file-descriptor of the connection with the label command" " associated with the session with pid " << sessionPid; @@ -510,7 +510,7 @@ int castor::tape::tapeserver::daemon::DriveCatalogue::getLabelCmdConnection( //----------------------------------------------------------------------------- // configureUp //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::configureUp(const std::string &unitName) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::configureUp(const std::string &unitName) { std::ostringstream task; task << "configure tape drive " << unitName << " up"; @@ -545,7 +545,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::configureUp(const std::st // configureDown //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::configureDown( - const std::string &unitName) throw(castor::exception::Exception) { + const std::string &unitName) { std::ostringstream task; task << "configure tape drive " << unitName << " down"; @@ -579,7 +579,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::configureDown( //----------------------------------------------------------------------------- // receivedVdqmJob //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::receivedVdqmJob(const legacymsg::RtcpJobRqstMsgBody &job) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::receivedVdqmJob(const legacymsg::RtcpJobRqstMsgBody &job) { const std::string unitName(job.driveUnit); std::ostringstream task; @@ -618,7 +618,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::receivedVdqmJob(const leg //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::receivedLabelJob( const legacymsg::TapeLabelRqstMsgBody &job, const int labelCmdConnection) - throw(castor::exception::Exception) { + { const std::string unitName(job.drive); std::ostringstream task; @@ -656,7 +656,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::receivedLabelJob( //----------------------------------------------------------------------------- // getVdqmJob //----------------------------------------------------------------------------- -const castor::legacymsg::RtcpJobRqstMsgBody &castor::tape::tapeserver::daemon::DriveCatalogue::getVdqmJob(const std::string &unitName) const throw(castor::exception::Exception) { +const castor::legacymsg::RtcpJobRqstMsgBody &castor::tape::tapeserver::daemon::DriveCatalogue::getVdqmJob(const std::string &unitName) const { std::ostringstream task; task << "get vdqm job for tape drive " << unitName; @@ -685,7 +685,7 @@ const castor::legacymsg::RtcpJobRqstMsgBody &castor::tape::tapeserver::daemon::D //----------------------------------------------------------------------------- // getLabelJob //----------------------------------------------------------------------------- -const castor::legacymsg::TapeLabelRqstMsgBody &castor::tape::tapeserver::daemon::DriveCatalogue::getLabelJob(const std::string &unitName) const throw(castor::exception::Exception) { +const castor::legacymsg::TapeLabelRqstMsgBody &castor::tape::tapeserver::daemon::DriveCatalogue::getLabelJob(const std::string &unitName) const { std::ostringstream task; task << "get label job for tape drive " << unitName; @@ -714,7 +714,7 @@ const castor::legacymsg::TapeLabelRqstMsgBody &castor::tape::tapeserver::daemon: //----------------------------------------------------------------------------- // forkedMountSession //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::forkedMountSession(const std::string &unitName, const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::forkedMountSession(const std::string &unitName, const pid_t sessionPid) { std::ostringstream task; task << "handle fork of mount session for tape drive " << unitName; @@ -746,7 +746,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::forkedMountSession(const //----------------------------------------------------------------------------- void castor::tape::tapeserver::daemon::DriveCatalogue::forkedLabelSession( const std::string &unitName, const pid_t sessionPid) - throw(castor::exception::Exception) { + { std::ostringstream task; task << "handle fork of label session for tape drive " << unitName; @@ -777,7 +777,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::forkedLabelSession( // getSessionPid //----------------------------------------------------------------------------- pid_t castor::tape::tapeserver::daemon::DriveCatalogue::getSessionPid( - const std::string &unitName) const throw(castor::exception::Exception) { + const std::string &unitName) const { std::ostringstream task; task << "get process ID of mount session for tape drive " << unitName; @@ -805,7 +805,7 @@ pid_t castor::tape::tapeserver::daemon::DriveCatalogue::getSessionPid( //----------------------------------------------------------------------------- // sessionSucceeded //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::sessionSucceeded(const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::sessionSucceeded(const pid_t sessionPid) { std::string unitName; try { unitName = getUnitName(sessionPid); @@ -823,7 +823,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::sessionSucceeded(const pi //----------------------------------------------------------------------------- // sessionSucceeded //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::sessionSucceeded(const std::string &unitName) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::sessionSucceeded(const std::string &unitName) { std::ostringstream task; task << "record tape session succeeded for tape drive " << unitName; @@ -854,7 +854,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::sessionSucceeded(const st //----------------------------------------------------------------------------- // sessionFailed //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::sessionFailed(const pid_t sessionPid) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::sessionFailed(const pid_t sessionPid) { std::string unitName; try { unitName = getUnitName(sessionPid); @@ -872,7 +872,7 @@ void castor::tape::tapeserver::daemon::DriveCatalogue::sessionFailed(const pid_t //----------------------------------------------------------------------------- // sessionFailed //----------------------------------------------------------------------------- -void castor::tape::tapeserver::daemon::DriveCatalogue::sessionFailed(const std::string &unitName) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::DriveCatalogue::sessionFailed(const std::string &unitName) { std::ostringstream task; task << "record tape session failed for tape drive " << unitName; diff --git a/castor/tape/tapeserver/daemon/DriveCatalogue.hpp b/castor/tape/tapeserver/daemon/DriveCatalogue.hpp index d62469bdda6d8d2f83e6253a7affde4a5c31adae..8a58f1b2eb59743e45113342b15db0c025a46ad4 100644 --- a/castor/tape/tapeserver/daemon/DriveCatalogue.hpp +++ b/castor/tape/tapeserver/daemon/DriveCatalogue.hpp @@ -176,7 +176,7 @@ public: * @param lines The lines parsed from /etc/castor/TPCONFIG. */ void populateCatalogue(const utils::TpconfigLines &lines) - throw(castor::exception::Exception); + ; /** * Returns the unit name of the tape drive on which the specified mount @@ -185,7 +185,7 @@ public: * @param sessionPid The process ID of the mount session. * @return the unit name of the tape drive. */ - std::string getUnitName(const pid_t sessionPid) const throw(castor::exception::Exception); + std::string getUnitName(const pid_t sessionPid) const ; /** * Returns an unordered list of the unit names of all of the tape drives @@ -193,7 +193,7 @@ public: * * @return Unordered list of the unit names. */ - std::list<std::string> getUnitNames() const throw(castor::exception::Exception); + std::list<std::string> getUnitNames() const ; /** * Returns an unordered list of the unit names of the tape drives in the @@ -202,7 +202,7 @@ public: * @return Unordered list of the unit names. */ std::list<std::string> getUnitNames(const DriveState state) - const throw(castor::exception::Exception); + const ; /** * Returns the device group name (DGN) of the specified tape drive. @@ -210,7 +210,7 @@ public: * @param unitName The unit name of the tape drive. */ const std::string &getDgn(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the VID of the tape mounted on the specified tape drive. @@ -218,7 +218,7 @@ public: * @param unitName The unit name of the tape drive. */ const std::string &getVid(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the time when the tape was mounted on the specified tape drive. @@ -226,7 +226,7 @@ public: * @param unitName The unit name of the tape drive. */ time_t getAssignmentTime(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the filename of the device file of the specified tape drive. @@ -234,7 +234,7 @@ public: * @param unitName The unit name of the tape drive. */ const std::string &getDevFilename(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the tape densities supported by the specified tape drive. @@ -242,7 +242,7 @@ public: * @param unitName The unit name of the tape drive. */ const std::list<std::string> &getDensities(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the type of the specified session. @@ -250,7 +250,7 @@ public: * @param sessionPid The process ID of the session. */ SessionType getSessionType(const pid_t sessionPid) - const throw(castor::exception::Exception); + const ; /** * Returns the current state of the specified tape drive. @@ -258,7 +258,7 @@ public: * @param unitName The unit name of the tape drive. */ DriveState getState(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the library slot of the specified tape drive. @@ -266,7 +266,7 @@ public: * @param unitName The unit name of the tape drive. */ const std::string &getLibrarySlot(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the device type of the specified tape drive in its libary. @@ -274,13 +274,13 @@ public: * @param unitName The unit name of the tape drive. */ const std::string &getDevType(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the file descriptor of the connection with the command-line * tool castor-tape-label. */ - int getLabelCmdConnection(const pid_t sessionPid) throw(castor::exception::Exception); + int getLabelCmdConnection(const pid_t sessionPid) ; /** * Moves the state of the specified tape drive to DRIVE_STATE_UP. @@ -292,7 +292,7 @@ public: * * @param unitName The unit name of the tape drive. */ - void configureUp(const std::string &unitName) throw(castor::exception::Exception); + void configureUp(const std::string &unitName) ; /** * Moves the state of the specified tape drive to DRIVE_STATE_DOWN. @@ -304,7 +304,7 @@ public: * * @param unitName The unit name of the tape drive. */ - void configureDown(const std::string &unitName) throw(castor::exception::Exception); + void configureDown(const std::string &unitName) ; /** * Moves the state of the specified tape drive to DRIVE_STATE_WAITFORK. @@ -324,7 +324,7 @@ public: * @param job The job received from the vdqmd daemon. */ void receivedVdqmJob(const legacymsg::RtcpJobRqstMsgBody &job) - throw(castor::exception::Exception); + ; /** * Moves the state of the specified tape drive to DRIVE_STATE_WAITLABEL. @@ -352,7 +352,7 @@ public: * with the tape labeling command-line tool castor-tape-label. */ void receivedLabelJob(const legacymsg::TapeLabelRqstMsgBody &job, - const int labelCmdConnection) throw(castor::exception::Exception); + const int labelCmdConnection) ; /** * Returns the job received from the vdqmd daemon for the specified tape @@ -365,7 +365,7 @@ public: * @return The job received from the vdqmd daemon. */ const legacymsg::RtcpJobRqstMsgBody &getVdqmJob(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Returns the job received from the vdqmd daemon for the specified tape @@ -378,7 +378,7 @@ public: * @return The job received from the vdqmd daemon. */ const legacymsg::TapeLabelRqstMsgBody &getLabelJob(const std::string &unitName) - const throw(castor::exception::Exception); + const ; /** * Moves the state of the specified tape drive to DRIVE_STATE_RUNNING. @@ -391,7 +391,7 @@ public: * running the mount session. */ void forkedMountSession(const std::string &unitName, const pid_t sessionPid) - throw(castor::exception::Exception); + ; /** * Moves the state of the specified tape drive to DRIVE_STATE_RUNNING. @@ -404,7 +404,7 @@ public: * running the label session. */ void forkedLabelSession(const std::string &unitName, const pid_t sessionPid) - throw(castor::exception::Exception); + ; /** * Returns the process ID of the child process responsible the mount session @@ -417,7 +417,7 @@ public: * @return The process ID of the child process responsible for mount session * running on the specified tape drive. */ - pid_t getSessionPid(const std::string &unitName) const throw(castor::exception::Exception); + pid_t getSessionPid(const std::string &unitName) const ; /** * Moves the state of the specified tape drive to DRIVE_STATE_UP if the @@ -429,7 +429,7 @@ public: * * @param sessionPid Process ID of the child process handling the session. */ - void sessionSucceeded(const pid_t sessionPid) throw(castor::exception::Exception); + void sessionSucceeded(const pid_t sessionPid) ; /** * Moves the state of the specified tape drive to DRIVE_STATE_UP if the @@ -441,7 +441,7 @@ public: * * @param unitName The unit name of the tape drive. */ - void sessionSucceeded(const std::string &unitName) throw(castor::exception::Exception); + void sessionSucceeded(const std::string &unitName) ; /** * Moves the state of the specified tape drive to DRIVE_STATE_DOWN. @@ -451,7 +451,7 @@ public: * * @param sessionPid Process ID of the child process handling the session. */ - void sessionFailed(const pid_t sessionPid) throw(castor::exception::Exception); + void sessionFailed(const pid_t sessionPid) ; /** * Moves the state of the specified tape drive to DRIVE_STATE_DOWN. @@ -461,7 +461,7 @@ public: * * @param unitName The unit name of the tape drive. */ - void sessionFailed(const std::string &unitName) throw(castor::exception::Exception); + void sessionFailed(const std::string &unitName) ; /** * Updates the vid and assignment time of the specified drive @@ -469,7 +469,7 @@ public: * @param vid Volume ID of the tape mounted * @param unitName Name of the drive */ - void updateVidAssignment(const std::string &vid, const std::string &unitName) throw(castor::exception::Exception); + void updateVidAssignment(const std::string &vid, const std::string &unitName) ; private: @@ -595,7 +595,7 @@ private: * * @param line The line parsed from /etc/castor/TPCONFIG. */ - void enterTpconfigLine(const utils::TpconfigLine &line) throw(castor::exception::Exception); + void enterTpconfigLine(const utils::TpconfigLine &line) ; /** * Returns the equivalent DriveState value of the specified string @@ -606,7 +606,7 @@ private: * * @param initialState String representation of the initial tape-drive state. */ - DriveState str2InitialState(const std::string &initialState) const throw(castor::exception::Exception); + DriveState str2InitialState(const std::string &initialState) const ; /** * Checks the semantics of the specified TPCONFIG line against the specified @@ -615,7 +615,7 @@ private: * @param catalogueEntry The catalogue entry. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLine(const DriveEntry &catalogueEntry, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLine(const DriveEntry &catalogueEntry, const utils::TpconfigLine &line) ; /** * Throws an exception if the specified catalogue value does not match the @@ -625,7 +625,7 @@ private: * the tape-drive catalogue. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLineDgn(const std::string &catalogueDgn, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLineDgn(const std::string &catalogueDgn, const utils::TpconfigLine &line) ; /** * Throws an exception if the specified catalogue value does not match the @@ -635,7 +635,7 @@ private: * drive that has been retrieved from the tape-drive catalogue. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLineDevFilename(const std::string &catalogueDevFilename, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLineDevFilename(const std::string &catalogueDevFilename, const utils::TpconfigLine &line) ; /** * Throws an exception if the specified catalogue value does not match the @@ -645,7 +645,7 @@ private: * have been retrived from the tape-drive catalogue. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLineDensity(const std::list<std::string> &catalogueDensities, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLineDensity(const std::list<std::string> &catalogueDensities, const utils::TpconfigLine &line) ; /** * Throws an exception if the specified catalogue value does not match the @@ -655,7 +655,7 @@ private: * has been retrieved from the tape-drive catalogue. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLineInitialState(const DriveState catalogueInitialState, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLineInitialState(const DriveState catalogueInitialState, const utils::TpconfigLine &line) ; /** * Throws an exception if the specified catalogue value does not match the @@ -665,7 +665,7 @@ private: * been retrieved from the tape-drive catalogue. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLineLibrarySlot(const std::string &catalogueLibrarySlot, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLineLibrarySlot(const std::string &catalogueLibrarySlot, const utils::TpconfigLine &line) ; /** * Throws an exception if the specified catalogue value does not match the @@ -675,7 +675,7 @@ private: * retrieved from the tape-drive library. * @param line The line parsed from /etc/castor/TPCONFIG. */ - void checkTpconfigLineDevType(const std::string &catalogueDevType, const utils::TpconfigLine &line) throw(castor::exception::Exception); + void checkTpconfigLineDevType(const std::string &catalogueDevType, const utils::TpconfigLine &line) ; }; // class DriveCatalogue diff --git a/castor/tape/tapeserver/daemon/LabelSession.cpp b/castor/tape/tapeserver/daemon/LabelSession.cpp index df8dd4fc68e13722fc597fffc1fedb15cf0f4c56..36c22a77bf96fd93fbbe0ab2430ac133a6a2e7cc 100644 --- a/castor/tape/tapeserver/daemon/LabelSession.cpp +++ b/castor/tape/tapeserver/daemon/LabelSession.cpp @@ -58,7 +58,7 @@ castor::tape::tapeserver::daemon::LabelSession::LabelSession( //------------------------------------------------------------------------------ // execute //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::LabelSession::execute() throw (castor::tape::Exception) { +void castor::tape::tapeserver::daemon::LabelSession::execute() { // 1) Prepare the logging environment LogContext lc(m_logger); diff --git a/castor/tape/tapeserver/daemon/LabelSession.hpp b/castor/tape/tapeserver/daemon/LabelSession.hpp index 136b9577c2cdaa7c5bd68d8977de82daf94a9a62..d42f472cde6a46e3137fb92a103b4feaa26c4256 100644 --- a/castor/tape/tapeserver/daemon/LabelSession.hpp +++ b/castor/tape/tapeserver/daemon/LabelSession.hpp @@ -58,7 +58,7 @@ namespace daemon { /** * The only method. It will call executeLabel to do the actual job */ - void execute() throw (Exception); + void execute() ; private: diff --git a/castor/tape/tapeserver/daemon/MigrationMemoryManager.cpp b/castor/tape/tapeserver/daemon/MigrationMemoryManager.cpp index d80839b2568eabed816057a9c80a478378731b0f..bd5a7ed91e8a6ae5ff5ffca40d340f819410f0c4 100644 --- a/castor/tape/tapeserver/daemon/MigrationMemoryManager.cpp +++ b/castor/tape/tapeserver/daemon/MigrationMemoryManager.cpp @@ -36,7 +36,7 @@ namespace daemon { //------------------------------------------------------------------------------ MigrationMemoryManager::MigrationMemoryManager(const size_t numberOfBlocks, const size_t blockSize, castor::log::LogContext lc) -throw(castor::exception::Exception): +: m_blockCapacity(blockSize), m_totalNumberOfBlocks(0), m_totalMemoryAllocated(0), m_blocksProvided(0), m_blocksReturned(0), m_lc(lc) @@ -73,7 +73,7 @@ MigrationMemoryManager::~MigrationMemoryManager() throw() { //------------------------------------------------------------------------------ // MigrationMemoryManager::startThreads //------------------------------------------------------------------------------ -void MigrationMemoryManager::startThreads() throw(castor::exception::Exception) { +void MigrationMemoryManager::startThreads() { castor::tape::threading::Thread::start(); m_lc.log(LOG_INFO, "MigrationMemoryManager starting thread"); } @@ -81,7 +81,7 @@ void MigrationMemoryManager::startThreads() throw(castor::exception::Exception) //------------------------------------------------------------------------------ // MigrationMemoryManager::waitThreads //------------------------------------------------------------------------------ -void MigrationMemoryManager::waitThreads() throw(castor::exception::Exception) { +void MigrationMemoryManager::waitThreads() { castor::tape::threading::Thread::wait(); } @@ -89,7 +89,7 @@ void MigrationMemoryManager::waitThreads() throw(castor::exception::Exception) { // MigrationMemoryManager::addClient //------------------------------------------------------------------------------ void MigrationMemoryManager::addClient(DataPipeline* c) -throw(castor::exception::Exception) { + { m_clientQueue.push(c); } @@ -112,7 +112,7 @@ size_t MigrationMemoryManager::blockCapacity() { // MigrationMemoryManager::finish //------------------------------------------------------------------------------ void MigrationMemoryManager::finish() -throw(castor::exception::Exception) { + { addClient(NULL); } @@ -120,7 +120,7 @@ throw(castor::exception::Exception) { // MigrationMemoryManager::releaseBlock //------------------------------------------------------------------------------ void MigrationMemoryManager::releaseBlock(MemBlock* mb) -throw(castor::exception::Exception) { + { mb->reset(); m_freeBlocks.push(mb); { @@ -132,7 +132,7 @@ throw(castor::exception::Exception) { //------------------------------------------------------------------------------ // MigrationMemoryManager::run //------------------------------------------------------------------------------ -void MigrationMemoryManager::run() throw(castor::exception::Exception) { +void MigrationMemoryManager::run() { while (true) { DataPipeline* c = m_clientQueue.pop(); // If the c is a NULL pointer, that means end of clients diff --git a/castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp b/castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp index f95d1a6fde0ae38d4913c763fecf3555b76a3f86..76f31aca8efa1522c1d9dcc288249389eb636ab2 100644 --- a/castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp +++ b/castor/tape/tapeserver/daemon/MigrationMemoryManager.hpp @@ -55,7 +55,7 @@ public: */ MigrationMemoryManager(const size_t numberOfBlocks, const size_t blockSize, castor::log::LogContext lc) - throw(castor::exception::Exception); + ; /** * @@ -72,30 +72,30 @@ public: /** * Start serving clients (in the dedicated thread) */ - void startThreads() throw(castor::exception::Exception); + void startThreads() ; /** * Waiting for clients to finish (in the dedicated thread) */ - void waitThreads() throw(castor::exception::Exception); + void waitThreads() ; /** * Adds a new client in need for free memory blocks * @param c: the new client */ - void addClient(DataPipeline* c) throw(castor::exception::Exception); + void addClient(DataPipeline* c) ; /** * Takes back a block which has been released by one of the clients * @param mb: the pointer to the block */ - void releaseBlock(MemBlock *mb) throw(castor::exception::Exception); + void releaseBlock(MemBlock *mb) ; /** * Function used to specify that there are no more clients for this memory manager. * See the definition of endOfClients below. */ - void finish() throw(castor::exception::Exception); + void finish() ; /** * Destructor @@ -151,7 +151,7 @@ private: /** * Thread routine: pops a client and provides him blocks until he is happy! */ - void run() throw(castor::exception::Exception); + void run() ; }; diff --git a/castor/tape/tapeserver/daemon/MountSession.cpp b/castor/tape/tapeserver/daemon/MountSession.cpp index d527762e01ad3910352a49fdd416f89723ba09eb..f4e9a1010f5894d61b898d70bc44095b25f0287c 100644 --- a/castor/tape/tapeserver/daemon/MountSession.cpp +++ b/castor/tape/tapeserver/daemon/MountSession.cpp @@ -78,7 +78,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession( * Then branch to the right execution */ void castor::tape::tapeserver::daemon::MountSession::execute() -throw (castor::tape::Exception) { + { // 1) Prepare the logging environment LogContext lc(m_logger); // Create a sticky thread name, which will be overridden by the other threads diff --git a/castor/tape/tapeserver/daemon/MountSession.hpp b/castor/tape/tapeserver/daemon/MountSession.hpp index 3e3b1f0e5006cb6631d0d6f736a344ec9aec7017..e287f6805c18499a1803fe1493857ef9473e5e78 100644 --- a/castor/tape/tapeserver/daemon/MountSession.hpp +++ b/castor/tape/tapeserver/daemon/MountSession.hpp @@ -111,7 +111,7 @@ namespace daemon { castor::legacymsg::TapeserverProxy & initialProcess, const CastorConf & castorConf); /** The only method. It will execute (like a task, that it is) */ - void execute() throw (Exception); + void execute() ; /** Temporary method used for debugging while building the session class */ std::string getVid() { return m_volInfo.vid; } private: diff --git a/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.cpp b/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.cpp index 06aab255d1fe9172a4e2a6f621eed05a3613865a..e73f93d1e1ac55ee95176bb13cb0ab5254b985e1 100644 --- a/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.cpp +++ b/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.cpp @@ -89,7 +89,7 @@ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::fillPollFd( //----------------------------------------------------------------------------- size_t castor::tape::tapeserver::daemon::MountSessionAcceptHandler::marshalRcReplyMsg(char *const dst, const size_t dstLen, const int rc) - throw(castor::exception::Exception) { + { legacymsg::MessageHeader src; src.magic = TPMAGIC; src.reqType = TAPERC; @@ -100,7 +100,7 @@ size_t castor::tape::tapeserver::daemon::MountSessionAcceptHandler::marshalRcRep //------------------------------------------------------------------------------ // writeRcReplyMsg //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::writeRcReplyMsg(const int fd, const int rc) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::writeRcReplyMsg(const int fd, const int rc) { char buf[REPBUFSZ]; const size_t len = marshalRcReplyMsg(buf, sizeof(buf), rc); try { @@ -117,7 +117,7 @@ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::writeRcReplyMs // handleEvent //------------------------------------------------------------------------------ bool castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleEvent( - const struct pollfd &fd) throw(castor::exception::Exception) { + const struct pollfd &fd) { checkHandleEventFd(fd.fd); // Do nothing if there is no data to read @@ -157,7 +157,7 @@ bool castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleEvent( // checkHandleEventFd //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::checkHandleEventFd( - const int fd) throw (castor::exception::Exception) { + const int fd) { if(m_fd != fd) { castor::exception::Exception ex; ex.getMessage() << "Failed to accept connection from the admin command" @@ -197,7 +197,7 @@ void //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleIncomingJob( const legacymsg::MessageHeader &header, const int clientConnection) - throw(castor::exception::Exception) { + { switch(header.reqType) { case SETVID: @@ -226,7 +226,7 @@ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleIncoming //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleIncomingSetVidJob( const legacymsg::MessageHeader &header, const int clientConnection) - throw(castor::exception::Exception) { + { castor::utils::SmartFd connection(clientConnection); const uint32_t bodyLen = header.lenOrStatus - 3 * sizeof(uint32_t); @@ -244,7 +244,7 @@ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleIncoming //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleIncomingLabelJob( const legacymsg::MessageHeader &header, const int clientConnection) - throw(castor::exception::Exception) { + { castor::utils::SmartFd connection(clientConnection); const uint32_t bodyLen = header.lenOrStatus - 3 * sizeof(uint32_t); @@ -270,7 +270,7 @@ void castor::tape::tapeserver::daemon::MountSessionAcceptHandler::handleIncoming //------------------------------------------------------------------------------ castor::legacymsg::MessageHeader castor::tape::tapeserver::daemon::MountSessionAcceptHandler::readJobMsgHeader( - const int clientConnection) throw(castor::exception::Exception) { + const int clientConnection) { castor::utils::SmartFd connection(clientConnection); // Read in the message header @@ -304,7 +304,7 @@ castor::legacymsg::MessageHeader castor::legacymsg::TapeUpdateDriveRqstMsgBody castor::tape::tapeserver::daemon::MountSessionAcceptHandler::readSetVidMsgBody(const int connection, const uint32_t len) - throw(castor::exception::Exception) { + { char buf[REQBUFSZ]; if(sizeof(buf) < len) { @@ -337,7 +337,7 @@ castor::legacymsg::TapeUpdateDriveRqstMsgBody castor::legacymsg::TapeLabelRqstMsgBody castor::tape::tapeserver::daemon::MountSessionAcceptHandler::readLabelRqstMsgBody(const int connection, const uint32_t len) - throw(castor::exception::Exception) { + { char buf[REQBUFSZ]; if(sizeof(buf) < len) { diff --git a/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.hpp b/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.hpp index 379ef73287eb6b8130a013fe252b2afdb7aaccc5..e9a783c54a68e0ea75e9fdd5a714dcaa28ece97b 100644 --- a/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.hpp +++ b/castor/tape/tapeserver/daemon/MountSessionAcceptHandler.hpp @@ -75,7 +75,7 @@ public: * the reactor. */ bool handleEvent(const struct pollfd &fd) - throw(castor::exception::Exception); + ; /** * Destructor. @@ -94,7 +94,7 @@ private: * @return The total length of the header. */ size_t marshalRcReplyMsg(char *const dst, const size_t dstLen, - const int rc) throw(castor::exception::Exception); + const int rc) ; /** * Writes a job reply message to the specified connection. @@ -104,7 +104,7 @@ private: * */ void writeRcReplyMsg(const int fd, const int rc) - throw(castor::exception::Exception); + ; /** * Marshals the specified source tape label reply message structure into the @@ -116,7 +116,7 @@ private: * @return The total length of the header. */ size_t marshalLabelReplyMsg(char *const dst, const size_t dstLen, - const int rc) throw(castor::exception::Exception); + const int rc) ; /** * Writes a job reply message to the tape label command connection. @@ -126,13 +126,13 @@ private: * */ void writeLabelReplyMsg(const int fd, const int rc) - throw(castor::exception::Exception); + ; /** * Throws an exception if the specified file-descriptor is not that of the * socket listening for connections from the mount session. */ - void checkHandleEventFd(const int fd) throw (castor::exception::Exception); + void checkHandleEventFd(const int fd) ; /** * Logs the reception of the specified job message from the tpconfig command. @@ -155,7 +155,7 @@ private: * the client. */ void handleIncomingJob(const legacymsg::MessageHeader &header, - const int clientConnection) throw(castor::exception::Exception); + const int clientConnection) ; /** * Handles an incoming job. @@ -172,7 +172,7 @@ private: * the client. */ void handleIncomingSetVidJob(const legacymsg::MessageHeader &header, - const int clientConnection) throw(castor::exception::Exception); + const int clientConnection) ; /** * Handles an incoming job. @@ -189,7 +189,7 @@ private: * the client. */ void handleIncomingLabelJob(const legacymsg::MessageHeader &header, - const int clientConnection) throw(castor::exception::Exception); + const int clientConnection) ; /** * Logs the reception of the specified job message from the tplabel command. @@ -205,7 +205,7 @@ private: * @return The message header. */ legacymsg::MessageHeader readJobMsgHeader(const int connection) - throw(castor::exception::Exception); + ; /** * Reads the body of a job message from the specified connection. @@ -215,7 +215,7 @@ private: * @return The message body. */ legacymsg::TapeUpdateDriveRqstMsgBody readSetVidMsgBody(const int connection, - const uint32_t len) throw(castor::exception::Exception); + const uint32_t len) ; /** * Reads the body of a job message from the specified connection. @@ -225,7 +225,7 @@ private: * @return The message body. */ legacymsg::TapeLabelRqstMsgBody readLabelRqstMsgBody(const int connection, - const uint32_t len) throw(castor::exception::Exception); + const uint32_t len) ; /** * The file descriptor of the socket listening for connections from the vdqmd diff --git a/castor/tape/tapeserver/daemon/TapeDaemon.cpp b/castor/tape/tapeserver/daemon/TapeDaemon.cpp index 88f6338591f7dbb362610975c49188f52e186655..344a9ac021cf130bdd59573b92940f3069a0fbe7 100644 --- a/castor/tape/tapeserver/daemon/TapeDaemon.cpp +++ b/castor/tape/tapeserver/daemon/TapeDaemon.cpp @@ -63,7 +63,7 @@ castor::tape::tapeserver::daemon::TapeDaemon::TapeDaemon( legacymsg::VmgrProxyFactory &vmgrFactory, legacymsg::RmcProxyFactory &rmcFactory, legacymsg::TapeserverProxyFactory &tapeserverFactory, - io::PollReactor &reactor) throw(castor::exception::Exception): + io::PollReactor &reactor) : castor::server::Daemon(stdOut, stdErr, log), m_argc(argc), m_argv(argv), @@ -82,7 +82,7 @@ castor::tape::tapeserver::daemon::TapeDaemon::TapeDaemon( //------------------------------------------------------------------------------ std::string castor::tape::tapeserver::daemon::TapeDaemon::getHostName() - const throw(castor::exception::Exception) { + const { char nameBuf[81]; if(gethostname(nameBuf, sizeof(nameBuf))) { char errBuf[100]; @@ -104,7 +104,7 @@ castor::tape::tapeserver::daemon::TapeDaemon::~TapeDaemon() throw() { //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int castor::tape::tapeserver::daemon::TapeDaemon::main() throw () { +int castor::tape::tapeserver::daemon::TapeDaemon::main() throw() { try { exceptionThrowingMain(m_argc, m_argv); @@ -130,7 +130,7 @@ int castor::tape::tapeserver::daemon::TapeDaemon::main() throw () { // exceptionThrowingMain //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::exceptionThrowingMain( - const int argc, char **const argv) throw(castor::exception::Exception) { + const int argc, char **const argv) { logStartOfDaemon(argc, argv); parseCommandLine(argc, argv); m_driveCatalogue.populateCatalogue(m_tpconfigLines); @@ -144,7 +144,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::exceptionThrowingMain( // getConfigString //------------------------------------------------------------------------------ std::string castor::tape::tapeserver::daemon::TapeDaemon::getConfigString( - const std::string &category, const std::string &name) throw(castor::exception::Exception) { + const std::string &category, const std::string &name) { using namespace castor; std::ostringstream task; @@ -237,7 +237,7 @@ std::string castor::tape::tapeserver::daemon::TapeDaemon::argvToString( // blockSignals //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::blockSignals() const - throw(castor::exception::Exception) { + { sigset_t sigs; sigemptyset(&sigs); // The signals that should not asynchronously disturb the daemon @@ -264,7 +264,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::blockSignals() const // registerTapeDrivesWithVdqm //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::registerTapeDrivesWithVdqm() - throw(castor::exception::Exception) { + { const std::list<std::string> unitNames = m_driveCatalogue.getUnitNames(); for(std::list<std::string>::const_iterator itor = unitNames.begin(); @@ -277,7 +277,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::registerTapeDrivesWithVdqm() // registerTapeDriveWithVdqm //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::registerTapeDriveWithVdqm( - const std::string &unitName) throw(castor::exception::Exception) { + const std::string &unitName) { const DriveCatalogue::DriveState driveState = m_driveCatalogue.getState(unitName); const std::string dgn = m_driveCatalogue.getDgn(unitName); @@ -316,7 +316,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::registerTapeDriveWithVdqm( // setUpReactor //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::setUpReactor() - throw(castor::exception::Exception) { + { createAndRegisterVdqmAcceptHandler(); createAndRegisterAdminAcceptHandler(); createAndRegisterMountSessionAcceptHandler(); @@ -325,7 +325,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::setUpReactor() //------------------------------------------------------------------------------ // createAndRegisterVdqmAcceptHandler //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterVdqmAcceptHandler() throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterVdqmAcceptHandler() { castor::utils::SmartFd listenSock; try { listenSock.reset(io::createListenerSock(TAPE_SERVER_VDQM_LISTENING_PORT)); @@ -360,7 +360,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterVdqmAcceptHa //------------------------------------------------------------------------------ // createAndRegisterAdminAcceptHandler //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterAdminAcceptHandler() throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterAdminAcceptHandler() { castor::utils::SmartFd listenSock; try { listenSock.reset(io::createListenerSock(TAPE_SERVER_ADMIN_LISTENING_PORT)); @@ -397,7 +397,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterAdminAcceptH //------------------------------------------------------------------------------ // createAndRegisterMountSessionAcceptHandler //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterMountSessionAcceptHandler() throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterMountSessionAcceptHandler() { castor::utils::SmartFd mountSessionListenSock; try { mountSessionListenSock.reset( @@ -437,7 +437,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::createAndRegisterMountSession // mainEventLoop //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::mainEventLoop() - throw(castor::exception::Exception) { + { while(handleEvents()) { forkMountSessions(); forkLabelSessions(); @@ -448,7 +448,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::mainEventLoop() // handleEvents //------------------------------------------------------------------------------ bool castor::tape::tapeserver::daemon::TapeDaemon::handleEvents() - throw(castor::exception::Exception) { + { // With our current understanding we see no reason for an exception from the // reactor to be used as a reason to stop the tapeserverd daemon. // @@ -696,7 +696,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::postProcessReapedLabelSession //----------------------------------------------------------------------------- size_t castor::tape::tapeserver::daemon::TapeDaemon::marshalTapeRcReplyMsg(char *const dst, const size_t dstLen, const int rc) - throw(castor::exception::Exception) { + { legacymsg::MessageHeader src; src.magic = TPMAGIC; src.reqType = TAPERC; @@ -707,7 +707,7 @@ size_t castor::tape::tapeserver::daemon::TapeDaemon::marshalTapeRcReplyMsg(char //------------------------------------------------------------------------------ // writeTapeRcReplyMsg //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::TapeDaemon::writeTapeRcReplyMsg(const int fd, const int rc) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::TapeDaemon::writeTapeRcReplyMsg(const int fd, const int rc) { char buf[REPBUFSZ]; const size_t len = marshalTapeRcReplyMsg(buf, sizeof(buf), rc); const int timeout = 10; //seconds @@ -725,7 +725,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::writeTapeRcReplyMsg(const int // notifyLabelCmdOfEndOfSession //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::TapeDaemon::notifyLabelCmdOfEndOfSession( - const pid_t sessionPid, const int waitpidStat) throw(castor::exception::Exception) { + const pid_t sessionPid, const int waitpidStat) { const int labelCmdConnection = m_driveCatalogue.getLabelCmdConnection(sessionPid); if(WIFEXITED(waitpidStat) && 0 == WEXITSTATUS(waitpidStat)) { diff --git a/castor/tape/tapeserver/daemon/TapeDaemon.hpp b/castor/tape/tapeserver/daemon/TapeDaemon.hpp index 2a57729e9d9988542c76ed1becbf43c464689568..22879875bd56366915a7790ce467724181ba7adc 100644 --- a/castor/tape/tapeserver/daemon/TapeDaemon.hpp +++ b/castor/tape/tapeserver/daemon/TapeDaemon.hpp @@ -86,7 +86,7 @@ public: legacymsg::VmgrProxyFactory &vmgrFactory, legacymsg::RmcProxyFactory &rmcFactory, legacymsg::TapeserverProxyFactory &tapeserverProxyFactory, - io::PollReactor &reactor) throw(castor::exception::Exception); + io::PollReactor &reactor) ; /** * Destructor. @@ -108,7 +108,7 @@ public: * @return string from castor.conf for this paramter */ static std::string getConfigString(const std::string &category, const std::string &name) - throw(castor::exception::Exception); + ; /** * Tries to get the value of the specified parameter from parsing (integer) @@ -118,7 +118,7 @@ public: * @return string from castor.conf for this paramter */ template<typename T> - static T getConfig(const std::string &category, const std::string &name) throw(castor::exception::Exception) { + static T getConfig(const std::string &category, const std::string &name) { std::string strVal = getConfigString(category, name); if (!castor::utils::isValidUInt(strVal.c_str())) throw castor::exception::InvalidConfigEntry(category.c_str(), name.c_str(), strVal.c_str()); @@ -134,7 +134,7 @@ protected: /** * Returns the name of the host on which the daemon is running. */ - std::string getHostName() const throw(castor::exception::Exception); + std::string getHostName() const ; /** * Exception throwing main() function. @@ -143,7 +143,7 @@ protected: * @param argv The array of command-line arguments. */ void exceptionThrowingMain(const int argc, char **const argv) - throw(castor::exception::Exception); + ; /** * Logs the start of the daemon. @@ -154,7 +154,7 @@ protected: * Parses the /etc/castor/TPCONFIG files in order to determine the drives * attached to the tape server. */ - void parseTpconfig() throw(castor::exception::Exception); + void parseTpconfig() ; /** * Writes the specified TPCONFIG lines to the logging system. @@ -183,54 +183,54 @@ protected: /** * Blocks the signals that should not asynchronously disturb the daemon. */ - void blockSignals() const throw(castor::exception::Exception); + void blockSignals() const ; /** * Registers the tape drives controlled by the tape server daemon with the * vdqmd daemon. */ - void registerTapeDrivesWithVdqm() throw(castor::exception::Exception); + void registerTapeDrivesWithVdqm() ; /** * Registers the specified tape drive with ethe vdqmd daemon. */ void registerTapeDriveWithVdqm(const std::string &unitName) - throw(castor::exception::Exception); + ; /** * Sets up the reactor. */ - void setUpReactor() throw(castor::exception::Exception); + void setUpReactor() ; /** * Creates the handler to accept connections from the vdqmd daemon and * registers it with the reactor. */ - void createAndRegisterVdqmAcceptHandler() throw(castor::exception::Exception); + void createAndRegisterVdqmAcceptHandler() ; /** * Creates the handler to accept connections from the admin commands and * registers it with the reactor. */ - void createAndRegisterAdminAcceptHandler() throw(castor::exception::Exception); + void createAndRegisterAdminAcceptHandler() ; /** * Creates the handler to accept connections from the mount session(s) and * registers it with the reactor. */ - void createAndRegisterMountSessionAcceptHandler() throw(castor::exception::Exception); + void createAndRegisterMountSessionAcceptHandler() ; /** * The main event loop of the daemon. */ - void mainEventLoop() throw(castor::exception::Exception); + void mainEventLoop() ; /** * Handles any pending events. * * @return True if the main event loop should continue, else false. */ - bool handleEvents() throw(castor::exception::Exception); + bool handleEvents() ; /** * Handles any pending signals. @@ -290,7 +290,7 @@ protected: * @return The total length of the header. */ size_t marshalTapeRcReplyMsg(char *const dst, const size_t dstLen, - const int rc) throw(castor::exception::Exception); + const int rc) ; /** * Writes a job reply message to the specified connection. @@ -300,7 +300,7 @@ protected: * */ void writeTapeRcReplyMsg(const int fd, const int rc) - throw(castor::exception::Exception); + ; /** * Does the required post processing for the specified reaped session. @@ -326,7 +326,7 @@ protected: * @param waitpidStat The status information given by a call to waitpid(). */ void notifyLabelCmdOfEndOfSession(const pid_t sessionPid, const int waitpidStat) - throw(castor::exception::Exception); + ; /** * Forks a mount-session child-process for every tape drive entry in the diff --git a/castor/tape/tapeserver/daemon/VdqmAcceptHandler.cpp b/castor/tape/tapeserver/daemon/VdqmAcceptHandler.cpp index 7a30f79532f56db0f5f0a1284f847322486ad467..3fd4536bbfdfd0ccf2a4e581f2553af09d761325 100644 --- a/castor/tape/tapeserver/daemon/VdqmAcceptHandler.cpp +++ b/castor/tape/tapeserver/daemon/VdqmAcceptHandler.cpp @@ -80,7 +80,7 @@ void castor::tape::tapeserver::daemon::VdqmAcceptHandler::fillPollFd( // handleEvent //------------------------------------------------------------------------------ bool castor::tape::tapeserver::daemon::VdqmAcceptHandler::handleEvent( - const struct pollfd &fd) throw(castor::exception::Exception) { + const struct pollfd &fd) { { log::Param params[] = { log::Param("fd" , fd.fd ), @@ -156,7 +156,7 @@ bool castor::tape::tapeserver::daemon::VdqmAcceptHandler::handleEvent( // checkHandleEventFd //------------------------------------------------------------------------------ void castor::tape::tapeserver::daemon::VdqmAcceptHandler::checkHandleEventFd( - const int fd) throw (castor::exception::Exception) { + const int fd) { if(m_fd != fd) { castor::exception::Exception ex; ex.getMessage() << "Failed to accept connection from vdqmd daemon" diff --git a/castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp b/castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp index 7446a583d48a477e45f522e3407f68a3938be81d..193cb445309a279aadd8a08eb3ae32b425ae039e 100644 --- a/castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp +++ b/castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp @@ -73,7 +73,7 @@ public: * the reactor. */ bool handleEvent(const struct pollfd &fd) - throw(castor::exception::Exception); + ; /** * Destructor. @@ -88,7 +88,7 @@ private: * Throws an exception if the specified file-descriptor is not that of the * socket listening for connections from the vdqmd daemon. */ - void checkHandleEventFd(const int fd) throw (castor::exception::Exception); + void checkHandleEventFd(const int fd) ; /** * The file descriptor of the socket listening for connections from the vdqmd diff --git a/castor/tape/tapeserver/daemon/VdqmConnectionHandler.cpp b/castor/tape/tapeserver/daemon/VdqmConnectionHandler.cpp index 19df86079e5756a91fa4dec7841601200b45d169..6fa9b383c2de94aea72770644d6c7ba64e43b2a2 100644 --- a/castor/tape/tapeserver/daemon/VdqmConnectionHandler.cpp +++ b/castor/tape/tapeserver/daemon/VdqmConnectionHandler.cpp @@ -68,7 +68,7 @@ void castor::tape::tapeserver::daemon::VdqmConnectionHandler::fillPollFd(struct //------------------------------------------------------------------------------ // handleEvent //------------------------------------------------------------------------------ -bool castor::tape::tapeserver::daemon::VdqmConnectionHandler::handleEvent(const struct pollfd &fd) throw(castor::exception::Exception) { +bool castor::tape::tapeserver::daemon::VdqmConnectionHandler::handleEvent(const struct pollfd &fd) { std::list<log::Param> params; params.push_back(log::Param("fd" , fd.fd )); params.push_back(log::Param("POLLIN" , fd.revents & POLLIN ? "true" : "false")); @@ -116,7 +116,7 @@ bool castor::tape::tapeserver::daemon::VdqmConnectionHandler::handleEvent(const //------------------------------------------------------------------------------ // checkHandleEventFd //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::VdqmConnectionHandler::checkHandleEventFd(const int fd) throw (castor::exception::Exception) { +void castor::tape::tapeserver::daemon::VdqmConnectionHandler::checkHandleEventFd(const int fd) { if(m_fd != fd) { castor::exception::Exception ex; ex.getMessage() << "Failed to handle vdqm connection" @@ -183,7 +183,7 @@ void castor::tape::tapeserver::daemon::VdqmConnectionHandler::logVdqmJobReceptio //------------------------------------------------------------------------------ // readJobMsg //------------------------------------------------------------------------------ -castor::legacymsg::RtcpJobRqstMsgBody castor::tape::tapeserver::daemon::VdqmConnectionHandler::readJobMsg(const int fd) throw(castor::exception::Exception) { +castor::legacymsg::RtcpJobRqstMsgBody castor::tape::tapeserver::daemon::VdqmConnectionHandler::readJobMsg(const int fd) { const legacymsg::MessageHeader header = readJobMsgHeader(fd); const legacymsg::RtcpJobRqstMsgBody body = readJobMsgBody(fd, header.lenOrStatus); @@ -194,7 +194,7 @@ castor::legacymsg::RtcpJobRqstMsgBody castor::tape::tapeserver::daemon::VdqmConn //------------------------------------------------------------------------------ // readJobMsgHeader //------------------------------------------------------------------------------ -castor::legacymsg::MessageHeader castor::tape::tapeserver::daemon::VdqmConnectionHandler::readJobMsgHeader(const int fd) throw(castor::exception::Exception) { +castor::legacymsg::MessageHeader castor::tape::tapeserver::daemon::VdqmConnectionHandler::readJobMsgHeader(const int fd) { // Read in the message header char buf[3 * sizeof(uint32_t)]; // magic + request type + len io::readBytes(fd, m_netTimeout, sizeof(buf), buf); @@ -230,7 +230,7 @@ castor::legacymsg::MessageHeader castor::tape::tapeserver::daemon::VdqmConnectio //------------------------------------------------------------------------------ // readJobMsgBody //------------------------------------------------------------------------------ -castor::legacymsg::RtcpJobRqstMsgBody castor::tape::tapeserver::daemon::VdqmConnectionHandler::readJobMsgBody(const int fd, const uint32_t len) throw(castor::exception::Exception) { +castor::legacymsg::RtcpJobRqstMsgBody castor::tape::tapeserver::daemon::VdqmConnectionHandler::readJobMsgBody(const int fd, const uint32_t len) { char buf[1024]; if(sizeof(buf) < len) { @@ -260,7 +260,7 @@ castor::legacymsg::RtcpJobRqstMsgBody castor::tape::tapeserver::daemon::VdqmConn //------------------------------------------------------------------------------ // writeJobReplyMsg //------------------------------------------------------------------------------ -void castor::tape::tapeserver::daemon::VdqmConnectionHandler::writeJobReplyMsg(const int fd) throw(castor::exception::Exception) { +void castor::tape::tapeserver::daemon::VdqmConnectionHandler::writeJobReplyMsg(const int fd) { legacymsg::RtcpJobReplyMsgBody body; char buf[1024]; const size_t len = legacymsg::marshal(buf, body); diff --git a/castor/tape/tapeserver/daemon/VdqmConnectionHandler.hpp b/castor/tape/tapeserver/daemon/VdqmConnectionHandler.hpp index 3537e2c5c1c58dc3f573f805048eed75e74a3927..14ae95a31e23557331f073d25be86612f60e805e 100644 --- a/castor/tape/tapeserver/daemon/VdqmConnectionHandler.hpp +++ b/castor/tape/tapeserver/daemon/VdqmConnectionHandler.hpp @@ -80,7 +80,7 @@ public: * * @param fd The poll file-descriptor describing the event. */ - bool handleEvent(const struct pollfd &fd) throw(castor::exception::Exception); + bool handleEvent(const struct pollfd &fd) ; /** * Destructor. @@ -121,7 +121,7 @@ private: * Throws an exception if the specified file-descriptor is not that of the * connection with the client. */ - void checkHandleEventFd(const int fd) throw (castor::exception::Exception); + void checkHandleEventFd(const int fd) ; /** * Returns true if the peer host of the connection being handled is @@ -144,7 +144,7 @@ private: * @return The job request from the vdqm. */ legacymsg::RtcpJobRqstMsgBody readJobMsg(const int fd) - throw(castor::exception::Exception); + ; /** * Reads the header of a job message from the specified connection. @@ -154,7 +154,7 @@ private: * @return The message header. */ legacymsg::MessageHeader readJobMsgHeader(const int fd) - throw(castor::exception::Exception); + ; /** * Reads the body of a job message from the specified connection. @@ -165,7 +165,7 @@ private: * @return The message body. */ legacymsg::RtcpJobRqstMsgBody readJobMsgBody(const int fd, - const uint32_t len) throw(castor::exception::Exception); + const uint32_t len) ; /** * Writes a job reply message to the specified connection. @@ -174,7 +174,7 @@ private: * daemon. */ void writeJobReplyMsg(const int fd) - throw(castor::exception::Exception); + ; }; // class VdqmConnectionHandler diff --git a/castor/tape/tapeserver/drive/Drive.cpp b/castor/tape/tapeserver/drive/Drive.cpp index c045bd35da271d5620c41b425067ff57de1cc859..6a9a3c63eb246ca36946de7b341e221b89382bf7 100644 --- a/castor/tape/tapeserver/drive/Drive.cpp +++ b/castor/tape/tapeserver/drive/Drive.cpp @@ -60,7 +60,7 @@ m_tapeFD(-1), m_sysWrapper(sw) { UpdateDriveStatus(); } -void drives::DriveGeneric::UpdateDriveStatus() throw (Exception) { +void drives::DriveGeneric::UpdateDriveStatus() { /* Read drive status */ castor::exception::Errnum::throwOnMinusOne(m_sysWrapper.ioctl(m_tapeFD, MTIOCGET, &m_mtInfo), std::string("Could not read drive status: ") + m_SCSIInfo.nst_dev); if(GMT_BOT(m_mtInfo.mt_gstat)) m_driveStatus.bot=true; else m_driveStatus.bot=false; @@ -74,7 +74,7 @@ void drives::DriveGeneric::UpdateDriveStatus() throw (Exception) { * All comulative and threshold log counter values will be reset to their * default values as specified in that pages reset behavior section. */ -void drives::DriveGeneric::clearCompressionStats() throw (Exception) { +void drives::DriveGeneric::clearCompressionStats() { SCSI::Structures::logSelectCDB_t cdb; cdb.PCR = 1; /* PCR set */ cdb.PC = 0x3; /* PC = 11b for T10000 only*/ @@ -97,7 +97,7 @@ void drives::DriveGeneric::clearCompressionStats() throw (Exception) { * Information about the drive. The vendor id is used in the user labels of the files. * @return The deviceInfo structure with the information about the drive. */ -drives::deviceInfo drives::DriveGeneric::getDeviceInfo() throw (Exception) { +drives::deviceInfo drives::DriveGeneric::getDeviceInfo() { SCSI::Structures::inquiryCDB_t cdb; SCSI::Structures::inquiryData_t inquiryData; SCSI::Structures::senseData_t<255> senseBuff; @@ -130,7 +130,7 @@ drives::deviceInfo drives::DriveGeneric::getDeviceInfo() throw (Exception) { * Information about the serial number of the drive. * @return Right-aligned ASCII data for the vendor-assigned serial number. */ -std::string drives::DriveGeneric::getSerialNumber() throw (Exception) { +std::string drives::DriveGeneric::getSerialNumber() { SCSI::Structures::inquiryCDB_t cdb; SCSI::Structures::inquiryUnitSerialNumberData_t inquirySerialData; SCSI::Structures::senseData_t<255> senseBuff; @@ -165,7 +165,7 @@ std::string drives::DriveGeneric::getSerialNumber() throw (Exception) { * @param blockId The blockId, represented in local endianness. */ void drives::DriveGeneric::positionToLogicalObject(uint32_t blockId) -throw (Exception) { + { SCSI::Structures::locate10CDB_t cdb; SCSI::Structures::senseData_t<255> senseBuff; SCSI::Structures::LinuxSGIO_t sgh; @@ -191,7 +191,7 @@ throw (Exception) { * on the dirty data still in the write buffer. */ drives::positionInfo drives::DriveGeneric::getPositionInfo() -throw (Exception) { + { SCSI::Structures::readPositionCDB_t cdb; SCSI::Structures::readPositionDataShortForm_t positionData; SCSI::Structures::senseData_t<255> senseBuff; @@ -238,7 +238,7 @@ throw (Exception) { * Section is 4.2.17 in SSC-3. * @return list of tape alerts descriptions. They are simply used for logging. */ -std::vector<std::string> drives::DriveGeneric::getTapeAlerts() throw (Exception) { +std::vector<std::string> drives::DriveGeneric::getTapeAlerts() { /* return vector */ std::vector<std::string> ret; /* We don't know how many elements we'll get. Prepare a 100 parameters array */ @@ -288,7 +288,7 @@ std::vector<std::string> drives::DriveGeneric::getTapeAlerts() throw (Exception) * on the drive for the tape. By default it is enabled. */ void drives::DriveGeneric::setDensityAndCompression(bool compression, - unsigned char densityCode) throw (Exception) { + unsigned char densityCode) { SCSI::Structures::modeSenseDeviceConfiguration_t devConfig; { // get info from the drive SCSI::Structures::modeSense6CDB_t cdb; @@ -346,7 +346,7 @@ void drives::DriveGeneric::setDensityAndCompression(bool compression, * layer, unless the parameter turns out to be disused. * @param bufWrite: value of the buffer write switch */ -void drives::DriveGeneric::setSTBufferWrite(bool bufWrite) throw (Exception) { +void drives::DriveGeneric::setSTBufferWrite(bool bufWrite) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTSETDRVBUFFER; m_mtCmd.mt_count = bufWrite ? (MT_ST_SETBOOLEANS | MT_ST_BUFFER_WRITES) : (MT_ST_CLEARBOOLEANS | MT_ST_BUFFER_WRITES); @@ -363,7 +363,7 @@ void drives::DriveGeneric::setSTBufferWrite(bool bufWrite) throw (Exception) { * all tape drives. * TODO: synchronous? Timeout? */ -void drives::DriveGeneric::spaceToEOM(void) throw (Exception) { +void drives::DriveGeneric::spaceToEOM(void) { setSTFastMTEOM(false); struct mtop m_mtCmd; m_mtCmd.mt_op = MTEOM; @@ -379,7 +379,7 @@ void drives::DriveGeneric::spaceToEOM(void) throw (Exception) { * the higher levels of the software (TODO: protected?). * @param fastMTEOM the option switch. */ -void drives::DriveGeneric::setSTFastMTEOM(bool fastMTEOM) throw (Exception) { +void drives::DriveGeneric::setSTFastMTEOM(bool fastMTEOM) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTSETDRVBUFFER; m_mtCmd.mt_count = fastMTEOM ? (MT_ST_SETBOOLEANS | MT_ST_FAST_MTEOM) : (MT_ST_CLEARBOOLEANS | MT_ST_FAST_MTEOM); @@ -392,7 +392,7 @@ void drives::DriveGeneric::setSTFastMTEOM(bool fastMTEOM) throw (Exception) { * Jump to end of data. EOM in ST driver jargon, end of data (which is more accurate) * in SCSI terminology). This uses the fast setting (not to be used for MIR rebuild) */ -void drives::DriveGeneric::fastSpaceToEOM(void) throw (Exception) { +void drives::DriveGeneric::fastSpaceToEOM(void) { setSTFastMTEOM(true); struct mtop m_mtCmd; m_mtCmd.mt_op = MTEOM; @@ -405,7 +405,7 @@ void drives::DriveGeneric::fastSpaceToEOM(void) throw (Exception) { /** * Rewind tape. */ -void drives::DriveGeneric::rewind(void) throw (Exception) { +void drives::DriveGeneric::rewind(void) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTREW; m_mtCmd.mt_count = 1; @@ -418,7 +418,7 @@ void drives::DriveGeneric::rewind(void) throw (Exception) { * Space count file marks backwards. * @param count */ -void drives::DriveGeneric::spaceFileMarksBackwards(size_t count) throw (Exception) { +void drives::DriveGeneric::spaceFileMarksBackwards(size_t count) { size_t tobeskipped = count; struct mtop m_mtCmd; m_mtCmd.mt_op = MTBSF; @@ -434,7 +434,7 @@ void drives::DriveGeneric::spaceFileMarksBackwards(size_t count) throw (Exceptio * Space count file marks forward. * @param count */ -void drives::DriveGeneric::spaceFileMarksForward(size_t count) throw (Exception) { +void drives::DriveGeneric::spaceFileMarksForward(size_t count) { size_t tobeskipped = count; struct mtop m_mtCmd; m_mtCmd.mt_op = MTFSF; @@ -453,7 +453,7 @@ void drives::DriveGeneric::spaceFileMarksForward(size_t count) throw (Exception) * next logical object is not a logical block (i.e. if it is a file mark instead). * @param count */ -void drives::DriveGeneric::spaceBlocksBackwards(size_t count) throw (Exception) { +void drives::DriveGeneric::spaceBlocksBackwards(size_t count) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTBSR; m_mtCmd.mt_count = (int)count; @@ -469,7 +469,7 @@ void drives::DriveGeneric::spaceBlocksBackwards(size_t count) throw (Exception) * next logical object is not a logical block (i.e. if it is a file mark instead). * @param count */ -void drives::DriveGeneric::spaceBlocksForward(size_t count) throw (Exception) { +void drives::DriveGeneric::spaceBlocksForward(size_t count) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTFSR; m_mtCmd.mt_count = (int)count; @@ -481,7 +481,7 @@ void drives::DriveGeneric::spaceBlocksForward(size_t count) throw (Exception) { /** * Unload the tape. */ -void drives::DriveGeneric::unloadTape(void) throw (Exception) { +void drives::DriveGeneric::unloadTape(void) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTUNLOAD; m_mtCmd.mt_count = 1; @@ -494,7 +494,7 @@ void drives::DriveGeneric::unloadTape(void) throw (Exception) { * Synch call to the tape drive. This function will not return before the * data in the drive's buffer is actually committed to the medium. */ -void drives::DriveGeneric::flush(void) throw (Exception) { +void drives::DriveGeneric::flush(void) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTWEOF; //Not using MTNOP because it doesn't do what it claims (see st source code) so here we put "write sync file marks" with count set to 0. // The following text is a quote from the SCSI Stream commands manual (SSC-3): @@ -510,7 +510,7 @@ void drives::DriveGeneric::flush(void) throw (Exception) { * are committed to medium. * @param count */ -void drives::DriveGeneric::writeSyncFileMarks(size_t count) throw (Exception) { +void drives::DriveGeneric::writeSyncFileMarks(size_t count) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTWEOF; m_mtCmd.mt_count = (int)count; @@ -524,7 +524,7 @@ void drives::DriveGeneric::writeSyncFileMarks(size_t count) throw (Exception) { * buffer and the function return immediately. * @param count */ -void drives::DriveGeneric::writeImmediateFileMarks(size_t count) throw (Exception) { +void drives::DriveGeneric::writeImmediateFileMarks(size_t count) { struct mtop m_mtCmd; m_mtCmd.mt_op = MTWEOFI; //Undocumented in "man st" needs the mtio_add.hh header file (see above) m_mtCmd.mt_count = (int)count; @@ -538,7 +538,7 @@ void drives::DriveGeneric::writeImmediateFileMarks(size_t count) throw (Exceptio * @param data pointer the the data block * @param count size of the data block */ -void drives::DriveGeneric::writeBlock(const void * data, size_t count) throw (Exception) { +void drives::DriveGeneric::writeBlock(const void * data, size_t count) { castor::exception::Errnum::throwOnMinusOne( m_sysWrapper.write(m_tapeFD, data, count), "Failed ST write in DriveGeneric::writeBlock"); @@ -550,7 +550,7 @@ void drives::DriveGeneric::writeBlock(const void * data, size_t count) throw (Ex * @param count size of the data block * @return the actual size of read data */ -ssize_t drives::DriveGeneric::readBlock(void * data, size_t count) throw (Exception) { +ssize_t drives::DriveGeneric::readBlock(void * data, size_t count) { ssize_t res = m_sysWrapper.read(m_tapeFD, data, count); castor::exception::Errnum::throwOnMinusOne(res, "Failed ST read in DriveGeneric::readBlock"); @@ -564,7 +564,7 @@ ssize_t drives::DriveGeneric::readBlock(void * data, size_t count) throw (Except * @param count size of the data block * @return the actual size of read data */ -void drives::DriveGeneric::readExactBlock(void * data, size_t count, std::string context) throw (Exception) { +void drives::DriveGeneric::readExactBlock(void * data, size_t count, std::string context) { ssize_t res = m_sysWrapper.read(m_tapeFD, data, count); // First handle block too big if (-1 == res && ENOSPC == errno) @@ -581,7 +581,7 @@ void drives::DriveGeneric::readExactBlock(void * data, size_t count, std::string * Read over a file mark. Throw an exception we do not read one. * @return the actual size of read data */ -void drives::DriveGeneric::readFileMark(std::string context) throw (Exception) { +void drives::DriveGeneric::readFileMark(std::string context) { char buff[4]; // We need to try and read at least a small amount of data // due to a bug in mhvtl ssize_t res = m_sysWrapper.read(m_tapeFD, buff, 4); @@ -627,7 +627,7 @@ void drives::DriveGeneric::SCSI_inquiry() { << SCSI::Structures::toString(*((SCSI::Structures::inquiryData_t *) dataBuff)); } -drives::compressionStats drives::DriveT10000::getCompression() throw (Exception) { +drives::compressionStats drives::DriveT10000::getCompression() { compressionStats driveCompressionStats; SCSI::Structures::LinuxSGIO_t sgh; @@ -684,7 +684,7 @@ drives::compressionStats drives::DriveT10000::getCompression() throw (Exception) return driveCompressionStats; } -drives::compressionStats drives::DriveLTO::getCompression() throw (Exception) { +drives::compressionStats drives::DriveLTO::getCompression() { SCSI::Structures::LinuxSGIO_t sgh; SCSI::Structures::logSenseCDB_t cdb; compressionStats driveCompressionStats; @@ -758,7 +758,7 @@ drives::compressionStats drives::DriveLTO::getCompression() throw (Exception) { return driveCompressionStats; } -drives::compressionStats drives::DriveIBM3592::getCompression() throw (Exception) { +drives::compressionStats drives::DriveIBM3592::getCompression() { SCSI::Structures::LinuxSGIO_t sgh; SCSI::Structures::logSenseCDB_t cdb; SCSI::Structures::senseData_t<255> senseBuff; @@ -825,13 +825,13 @@ const char filemark[] = ""; drives::FakeDrive::FakeDrive() throw() : m_current_position(0) { m_tape.reserve(max_fake_drive_record_length); } -drives::compressionStats drives::FakeDrive::getCompression() throw (Exception) { +drives::compressionStats drives::FakeDrive::getCompression() { throw Exception("FakeDrive::getCompression Not implemented"); } -void drives::FakeDrive::clearCompressionStats() throw (Exception) { +void drives::FakeDrive::clearCompressionStats() { throw Exception("FakeDrive::clearCompressionStats Not implemented"); } -drives::deviceInfo drives::FakeDrive::getDeviceInfo() throw (Exception) { +drives::deviceInfo drives::FakeDrive::getDeviceInfo() { deviceInfo devInfo; devInfo.product = "Fake Drv"; devInfo.productRevisionLevel = "0.1"; @@ -839,13 +839,13 @@ drives::deviceInfo drives::FakeDrive::getDeviceInfo() throw (Exception) { devInfo.serialNumber = "123456"; return devInfo; } -std::string drives::FakeDrive::getSerialNumber() throw (Exception) { +std::string drives::FakeDrive::getSerialNumber() { throw Exception("FakeDrive::getSerialNumber Not implemented"); } -void drives::FakeDrive::positionToLogicalObject(uint32_t blockId) throw (Exception) { +void drives::FakeDrive::positionToLogicalObject(uint32_t blockId) { m_current_position = blockId; } -drives::positionInfo drives::FakeDrive::getPositionInfo() throw (Exception) { +drives::positionInfo drives::FakeDrive::getPositionInfo() { positionInfo pos; pos.currentPosition = m_current_position; pos.dirtyBytesCount = 0; @@ -853,31 +853,31 @@ drives::positionInfo drives::FakeDrive::getPositionInfo() throw (Exception) { pos.oldestDirtyObject = 0; return pos; } -std::vector<std::string> drives::FakeDrive::getTapeAlerts() throw (Exception) { +std::vector<std::string> drives::FakeDrive::getTapeAlerts() { throw Exception("FakeDrive::getTapeAlerts Not implemented"); } -void drives::FakeDrive::setDensityAndCompression(bool compression, unsigned char densityCode) throw (Exception) { +void drives::FakeDrive::setDensityAndCompression(bool compression, unsigned char densityCode) { throw Exception("FakeDrive::setDensityAndCompression Not implemented"); } -drives::driveStatus drives::FakeDrive::getDriveStatus() throw (Exception) { +drives::driveStatus drives::FakeDrive::getDriveStatus() { throw Exception("FakeDrive::getDriveStatus Not implemented"); } -drives::tapeError drives::FakeDrive::getTapeError() throw (Exception) { +drives::tapeError drives::FakeDrive::getTapeError() { throw Exception("FakeDrive::getTapeError Not implemented"); } -void drives::FakeDrive::setSTBufferWrite(bool bufWrite) throw (Exception) { +void drives::FakeDrive::setSTBufferWrite(bool bufWrite) { throw Exception("FakeDrive::setSTBufferWrite Not implemented"); } -void drives::FakeDrive::fastSpaceToEOM(void) throw (Exception) { +void drives::FakeDrive::fastSpaceToEOM(void) { m_current_position = m_tape.size()-1; } -void drives::FakeDrive::rewind(void) throw (Exception) { +void drives::FakeDrive::rewind(void) { m_current_position = 0; } -void drives::FakeDrive::spaceToEOM(void) throw (Exception) { +void drives::FakeDrive::spaceToEOM(void) { m_current_position = m_tape.size()-1; } -void drives::FakeDrive::spaceFileMarksBackwards(size_t count) throw (Exception) { +void drives::FakeDrive::spaceFileMarksBackwards(size_t count) { if(!count) return; size_t countdown = count; std::vector<std::string>::size_type i=0; @@ -889,7 +889,7 @@ void drives::FakeDrive::spaceFileMarksBackwards(size_t count) throw (Exception) } m_current_position = i-1; //BOT side of the filemark } -void drives::FakeDrive::spaceFileMarksForward(size_t count) throw (Exception) { +void drives::FakeDrive::spaceFileMarksForward(size_t count) { if(!count) return; size_t countdown = count; std::vector<std::string>::size_type i=0; @@ -901,18 +901,18 @@ void drives::FakeDrive::spaceFileMarksForward(size_t count) throw (Exception) { } m_current_position = i; //EOT side of the filemark } -void drives::FakeDrive::spaceBlocksBackwards(size_t count) throw (Exception) { +void drives::FakeDrive::spaceBlocksBackwards(size_t count) { m_current_position -= count; } -void drives::FakeDrive::spaceBlocksForward(size_t count) throw (Exception) { +void drives::FakeDrive::spaceBlocksForward(size_t count) { m_current_position += count; } -void drives::FakeDrive::unloadTape(void) throw (Exception) { +void drives::FakeDrive::unloadTape(void) { } -void drives::FakeDrive::flush(void) throw (Exception) { +void drives::FakeDrive::flush(void) { //already flushing } -void drives::FakeDrive::writeSyncFileMarks(size_t count) throw (Exception) { +void drives::FakeDrive::writeSyncFileMarks(size_t count) { if(count==0) return; m_tape.resize(m_current_position+count); for(size_t i=0; i<count; ++i) { @@ -925,15 +925,15 @@ void drives::FakeDrive::writeSyncFileMarks(size_t count) throw (Exception) { m_current_position++; } } -void drives::FakeDrive::writeImmediateFileMarks(size_t count) throw (Exception) { +void drives::FakeDrive::writeImmediateFileMarks(size_t count) { writeSyncFileMarks(count); } -void drives::FakeDrive::writeBlock(const void * data, size_t count) throw (Exception) { +void drives::FakeDrive::writeBlock(const void * data, size_t count) { m_tape.resize(m_current_position+1); m_tape[m_current_position].assign((const char *)data, count); m_current_position++; } -ssize_t drives::FakeDrive::readBlock(void *data, size_t count) throw (Exception) { +ssize_t drives::FakeDrive::readBlock(void *data, size_t count) { if(count < m_tape[m_current_position].size()) { throw Exception("Block size too small in FakeDrive::readBlock"); } @@ -953,7 +953,7 @@ std::string drives::FakeDrive::contentToString() throw() { exc << std::endl; return exc.str(); } -void drives::FakeDrive::readExactBlock(void *data, size_t count, std::string context) throw (Exception) { +void drives::FakeDrive::readExactBlock(void *data, size_t count, std::string context) { if(count != m_tape[m_current_position].size()) { std::stringstream exc; exc << "Wrong block size in FakeDrive::readExactBlock. Expected: " << count << " Found: " << m_tape[m_current_position].size() << " Position: " << m_current_position << " String: " << m_tape[m_current_position] << std::endl; @@ -965,21 +965,21 @@ void drives::FakeDrive::readExactBlock(void *data, size_t count, std::string con } m_current_position++; } -void drives::FakeDrive::readFileMark(std::string context) throw (Exception) { +void drives::FakeDrive::readFileMark(std::string context) { if(m_tape[m_current_position].compare(filemark)) { throw Exception("Failed FakeDrive::readFileMark"); } m_current_position++; } -bool drives::FakeDrive::isReady() throw(Exception) { +bool drives::FakeDrive::isReady() { return true; } -bool drives::FakeDrive::isWriteProtected() throw(Exception) { +bool drives::FakeDrive::isWriteProtected() { return false; } -bool drives::FakeDrive::isAtBOT() throw(Exception) { +bool drives::FakeDrive::isAtBOT() { return m_current_position==0; } -bool drives::FakeDrive::isAtEOD() throw(Exception) { +bool drives::FakeDrive::isAtEOD() { return m_current_position==m_tape.size()-1; } diff --git a/castor/tape/tapeserver/drive/Drive.hpp b/castor/tape/tapeserver/drive/Drive.hpp index 093b26c1ffdb008d0022f099f8007bcecfdd90c2..22de6e377890ef419607a23c03df8788c15466d0 100644 --- a/castor/tape/tapeserver/drive/Drive.hpp +++ b/castor/tape/tapeserver/drive/Drive.hpp @@ -135,37 +135,37 @@ namespace drives { class DriveInterface { public: virtual ~DriveInterface(){}; - virtual compressionStats getCompression() throw (Exception) = 0; - virtual void clearCompressionStats() throw (Exception) = 0; - virtual deviceInfo getDeviceInfo() throw (Exception) = 0; - virtual std::string getSerialNumber() throw (Exception) = 0; - virtual void positionToLogicalObject(uint32_t blockId) throw (Exception) = 0; - virtual positionInfo getPositionInfo() throw (Exception) = 0; - virtual std::vector<std::string> getTapeAlerts() throw (Exception) = 0; + virtual compressionStats getCompression() = 0; + virtual void clearCompressionStats() = 0; + virtual deviceInfo getDeviceInfo() = 0; + virtual std::string getSerialNumber() = 0; + virtual void positionToLogicalObject(uint32_t blockId) = 0; + virtual positionInfo getPositionInfo() = 0; + virtual std::vector<std::string> getTapeAlerts() = 0; virtual void setDensityAndCompression(bool compression = true, - unsigned char densityCode = 0) throw (Exception) = 0; - virtual driveStatus getDriveStatus() throw (Exception) = 0; - virtual tapeError getTapeError() throw (Exception) = 0; - virtual void setSTBufferWrite(bool bufWrite) throw (Exception) = 0; - virtual void fastSpaceToEOM(void) throw (Exception) = 0; - virtual void rewind(void) throw (Exception) = 0; - virtual void spaceToEOM(void) throw (Exception) = 0; - virtual void spaceFileMarksBackwards(size_t count) throw (Exception) = 0; - virtual void spaceFileMarksForward(size_t count) throw (Exception) = 0; - virtual void spaceBlocksBackwards(size_t count) throw (Exception) = 0; - virtual void spaceBlocksForward(size_t count) throw (Exception) = 0; - virtual void unloadTape(void) throw (Exception) = 0; - virtual void flush(void) throw (Exception) = 0; - virtual void writeSyncFileMarks(size_t count) throw (Exception) = 0; - virtual void writeImmediateFileMarks(size_t count) throw (Exception) = 0; - virtual void writeBlock(const void * data, size_t count) throw (Exception) = 0; - virtual ssize_t readBlock(void * data, size_t count) throw (Exception) = 0; - virtual void readExactBlock(void * data, size_t count, std::string context) throw (Exception) = 0; - virtual void readFileMark(std::string context) throw (Exception) = 0; - virtual bool isReady() throw(Exception) = 0; - virtual bool isWriteProtected() throw(Exception) = 0; - virtual bool isAtBOT() throw(Exception) = 0; - virtual bool isAtEOD() throw(Exception) = 0; + unsigned char densityCode = 0) = 0; + virtual driveStatus getDriveStatus() = 0; + virtual tapeError getTapeError() = 0; + virtual void setSTBufferWrite(bool bufWrite) = 0; + virtual void fastSpaceToEOM(void) = 0; + virtual void rewind(void) = 0; + virtual void spaceToEOM(void) = 0; + virtual void spaceFileMarksBackwards(size_t count) = 0; + virtual void spaceFileMarksForward(size_t count) = 0; + virtual void spaceBlocksBackwards(size_t count) = 0; + virtual void spaceBlocksForward(size_t count) = 0; + virtual void unloadTape(void) = 0; + virtual void flush(void) = 0; + virtual void writeSyncFileMarks(size_t count) = 0; + virtual void writeImmediateFileMarks(size_t count) = 0; + virtual void writeBlock(const void * data, size_t count) = 0; + virtual ssize_t readBlock(void * data, size_t count) = 0; + virtual void readExactBlock(void * data, size_t count, std::string context) = 0; + virtual void readFileMark(std::string context) = 0; + virtual bool isReady() = 0; + virtual bool isWriteProtected() = 0; + virtual bool isAtBOT() = 0; + virtual bool isAtEOD() = 0; /** Member string allowing the convenient storage of the string describing * drive location for the mount system (we get the information from TPCONFIG*/ std::string librarySlot; @@ -192,37 +192,37 @@ namespace drives { std::string contentToString() throw(); FakeDrive() throw(); virtual ~FakeDrive() throw(){} - virtual compressionStats getCompression() throw (Exception); - virtual void clearCompressionStats() throw (Exception); - virtual deviceInfo getDeviceInfo() throw (Exception); - virtual std::string getSerialNumber() throw (Exception); - virtual void positionToLogicalObject(uint32_t blockId) throw (Exception); - virtual positionInfo getPositionInfo() throw (Exception); - virtual std::vector<std::string> getTapeAlerts() throw (Exception); + virtual compressionStats getCompression() ; + virtual void clearCompressionStats() ; + virtual deviceInfo getDeviceInfo() ; + virtual std::string getSerialNumber() ; + virtual void positionToLogicalObject(uint32_t blockId) ; + virtual positionInfo getPositionInfo() ; + virtual std::vector<std::string> getTapeAlerts() ; virtual void setDensityAndCompression(bool compression = true, - unsigned char densityCode = 0) throw (Exception); - virtual driveStatus getDriveStatus() throw (Exception); - virtual tapeError getTapeError() throw (Exception); - virtual void setSTBufferWrite(bool bufWrite) throw (Exception); - virtual void fastSpaceToEOM(void) throw (Exception); - virtual void rewind(void) throw (Exception); - virtual void spaceToEOM(void) throw (Exception); - virtual void spaceFileMarksBackwards(size_t count) throw (Exception); - virtual void spaceFileMarksForward(size_t count) throw (Exception); - virtual void spaceBlocksBackwards(size_t count) throw (Exception); - virtual void spaceBlocksForward(size_t count) throw (Exception); - virtual void unloadTape(void) throw (Exception); - virtual void flush(void) throw (Exception); - virtual void writeSyncFileMarks(size_t count) throw (Exception); - virtual void writeImmediateFileMarks(size_t count) throw (Exception); - virtual void writeBlock(const void * data, size_t count) throw (Exception); - virtual ssize_t readBlock(void * data, size_t count) throw (Exception); - virtual void readExactBlock(void * data, size_t count, std::string context) throw (Exception); - virtual void readFileMark(std::string context) throw (Exception); - virtual bool isReady() throw(Exception); - virtual bool isWriteProtected() throw(Exception); - virtual bool isAtBOT() throw(Exception); - virtual bool isAtEOD() throw(Exception); + unsigned char densityCode = 0) ; + virtual driveStatus getDriveStatus() ; + virtual tapeError getTapeError() ; + virtual void setSTBufferWrite(bool bufWrite) ; + virtual void fastSpaceToEOM(void) ; + virtual void rewind(void) ; + virtual void spaceToEOM(void) ; + virtual void spaceFileMarksBackwards(size_t count) ; + virtual void spaceFileMarksForward(size_t count) ; + virtual void spaceBlocksBackwards(size_t count) ; + virtual void spaceBlocksForward(size_t count) ; + virtual void unloadTape(void) ; + virtual void flush(void) ; + virtual void writeSyncFileMarks(size_t count) ; + virtual void writeImmediateFileMarks(size_t count) ; + virtual void writeBlock(const void * data, size_t count) ; + virtual ssize_t readBlock(void * data, size_t count) ; + virtual void readExactBlock(void * data, size_t count, std::string context) ; + virtual void readFileMark(std::string context) ; + virtual bool isReady() ; + virtual bool isWriteProtected() ; + virtual bool isAtBOT() ; + virtual bool isAtEOD() ; }; /** @@ -246,26 +246,26 @@ namespace drives { * fields toHost, fromDrive are related to the read operation. * @return compressionStats */ - virtual compressionStats getCompression() throw (Exception) = 0; + virtual compressionStats getCompression() = 0; /** * Reset all statistics about data movements on the drive. * All cumulative and threshold log counter values will be reset to their * default values as specified in that pages reset behavior section. */ - virtual void clearCompressionStats() throw (Exception); + virtual void clearCompressionStats() ; /** * Information about the drive. The vendor id is used in the user labels of the files. * @return The deviceInfo structure with the information about the drive. */ - virtual deviceInfo getDeviceInfo() throw (Exception); + virtual deviceInfo getDeviceInfo() ; /** * Information about the serial number of the drive. * @return Right-aligned ASCII data for the vendor-assigned serial number. */ - virtual std::string getSerialNumber() throw (Exception); + virtual std::string getSerialNumber() ; /** * Position to logical object identifier (i.e. block address). @@ -274,7 +274,7 @@ namespace drives { * has completed. * @param blockId The blockId, represented in local endianness. */ - virtual void positionToLogicalObject(uint32_t blockId) throw (Exception); + virtual void positionToLogicalObject(uint32_t blockId) ; /** * Return logical position of the drive. This is the address of the next object @@ -282,14 +282,14 @@ namespace drives { * @return positionInfo class. This contains the logical position, plus information * on the dirty data still in the write buffer. */ - virtual positionInfo getPositionInfo() throw (Exception); + virtual positionInfo getPositionInfo() ; /** * Get tape alert information from the drive. There is a quite long list of possible tape alerts. * They are described in SSC-4, section 4.2.20: TapeAlert application client interface * @return list of tape alerts descriptions. They are simply used for logging. */ - virtual std::vector<std::string> getTapeAlerts() throw (Exception); + virtual std::vector<std::string> getTapeAlerts() ; /** * Set the tape density and compression. @@ -305,17 +305,17 @@ namespace drives { * on the drive for the tape. By default it is enabled. */ virtual void setDensityAndCompression(bool compression = true, - unsigned char densityCode = 0) throw (Exception); + unsigned char densityCode = 0) ; /** * Get drive status. * @return structure containing various booleans, and error conditions. */ - virtual driveStatus getDriveStatus() throw (Exception) { + virtual driveStatus getDriveStatus() { throw Exception("Not implemented"); } - virtual bool isReady() throw(Exception) { + virtual bool isReady() { // we need to reopen the drive to have the GMT_ONLINE check working (see "man st") castor::exception::Errnum::throwOnMinusOne(m_sysWrapper.close(m_tapeFD), std::string("Could not close device file: ") + m_SCSIInfo.nst_dev); @@ -326,17 +326,17 @@ namespace drives { return m_driveStatus.ready; } - virtual bool isWriteProtected() throw(Exception) { + virtual bool isWriteProtected() { UpdateDriveStatus(); return m_driveStatus.writeProtection; } - virtual bool isAtBOT() throw(Exception) { + virtual bool isAtBOT() { UpdateDriveStatus(); return m_driveStatus.bot; } - virtual bool isAtEOD() throw(Exception) { + virtual bool isAtEOD() { UpdateDriveStatus(); return m_driveStatus.eod; } @@ -370,7 +370,7 @@ namespace drives { * {"Wrong tape media", ETCOMPA} * @return error code and string containing the error description */ - virtual tapeError getTapeError() throw (Exception) { + virtual tapeError getTapeError() { throw Exception("Not implemented"); } @@ -380,7 +380,7 @@ namespace drives { * layer, unless the parameter turns out to be disused. * @param bufWrite: value of the buffer write switch */ - virtual void setSTBufferWrite(bool bufWrite) throw (Exception); + virtual void setSTBufferWrite(bool bufWrite) ; /** * Jump to end of media. This will use setSTFastMTEOM() to disable MT_ST_FAST_MTEOM. @@ -390,74 +390,74 @@ namespace drives { * all tape drives. * TODO: synchronous? Timeout? */ - virtual void fastSpaceToEOM(void) throw (Exception); + virtual void fastSpaceToEOM(void) ; /** * Rewind tape. */ - virtual void rewind(void) throw (Exception); + virtual void rewind(void) ; /** * Jump to end of data. EOM in ST driver jargon, end of data (which is more accurate) * in SCSI terminology). */ - virtual void spaceToEOM(void) throw (Exception); + virtual void spaceToEOM(void) ; /** * Space count file marks backwards. * @param count */ - virtual void spaceFileMarksBackwards(size_t count) throw (Exception); + virtual void spaceFileMarksBackwards(size_t count) ; /** * Space count file marks forward. * @param count */ - virtual void spaceFileMarksForward(size_t count) throw (Exception); + virtual void spaceFileMarksForward(size_t count) ; /** * Space count blocks backwards. * @param count */ - virtual void spaceBlocksBackwards(size_t count) throw (Exception); + virtual void spaceBlocksBackwards(size_t count) ; /** * Space count blocks forward. * @param count */ - virtual void spaceBlocksForward(size_t count) throw (Exception); + virtual void spaceBlocksForward(size_t count) ; /** * Unload the tape. */ - virtual void unloadTape(void) throw (Exception); + virtual void unloadTape(void) ; /** * Synch call to the tape drive. This function will not return before the * data in the drive's buffer is actually comitted to the medium. */ - virtual void flush(void) throw (Exception); + virtual void flush(void) ; /** * Write count file marks. The function does not return before the file marks * are committed to medium. * @param count */ - virtual void writeSyncFileMarks(size_t count) throw (Exception); + virtual void writeSyncFileMarks(size_t count) ; /** * Write count file marks asynchronously. The file marks are just added to the drive's * buffer and the function return immediately. * @param count */ - virtual void writeImmediateFileMarks(size_t count) throw (Exception); + virtual void writeImmediateFileMarks(size_t count) ; /** * Write a data block to tape. * @param data pointer the the data block * @param count size of the data block */ - virtual void writeBlock(const void * data, size_t count) throw (Exception); + virtual void writeBlock(const void * data, size_t count) ; /** * Read a data block from tape. @@ -465,7 +465,7 @@ namespace drives { * @param count size of the data block * @return the actual size of read data */ - virtual ssize_t readBlock(void * data, size_t count) throw (Exception); + virtual ssize_t readBlock(void * data, size_t count) ; /** * Read a data block from tape. Throw an exception if the read block is not @@ -475,13 +475,13 @@ namespace drives { * @param context optional context to be added to the thrown exception * @return the actual size of read data */ - virtual void readExactBlock(void * data, size_t count, std::string context= "") throw (Exception); + virtual void readExactBlock(void * data, size_t count, std::string context= "") ; /** * Read over a file mark. Throw an exception we do not read one. * @return the actual size of read data */ - virtual void readFileMark(std::string context= "") throw (Exception); + virtual void readFileMark(std::string context= "") ; virtual ~DriveGeneric() { if (-1 != m_tapeFD) @@ -504,12 +504,12 @@ namespace drives { * the higher levels of the software (TODO: protected?). * @param fastMTEOM the option switch. */ - virtual void setSTFastMTEOM(bool fastMTEOM) throw (Exception); + virtual void setSTFastMTEOM(bool fastMTEOM) ; /** * Update the drive status member. */ - virtual void UpdateDriveStatus() throw (Exception); + virtual void UpdateDriveStatus() ; }; class DriveT10000 : public DriveGeneric { @@ -518,7 +518,7 @@ namespace drives { DriveT10000(SCSI::DeviceInfo di, System::virtualWrapper & sw) : DriveGeneric(di, sw) { } - virtual compressionStats getCompression() throw (Exception); + virtual compressionStats getCompression() ; }; class DriveLTO : public DriveGeneric { @@ -527,7 +527,7 @@ namespace drives { DriveLTO(SCSI::DeviceInfo di, System::virtualWrapper & sw) : DriveGeneric(di, sw) { } - virtual compressionStats getCompression() throw (Exception); + virtual compressionStats getCompression() ; }; class DriveIBM3592 : public DriveGeneric { @@ -536,7 +536,7 @@ namespace drives { DriveIBM3592(SCSI::DeviceInfo di, System::virtualWrapper & sw) : DriveGeneric(di, sw) { } - virtual compressionStats getCompression() throw (Exception); + virtual compressionStats getCompression() ; }; } // namespace drives diff --git a/castor/tape/tapeserver/file/File.cpp b/castor/tape/tapeserver/file/File.cpp index e3388ba417fce81575207255c2d9b068b623bb1c..559d9bf0743a70a331964665a6dbbedeca892e00 100644 --- a/castor/tape/tapeserver/file/File.cpp +++ b/castor/tape/tapeserver/file/File.cpp @@ -41,7 +41,7 @@ namespace castor { namespace tape { namespace tapeFile { - LabelSession::LabelSession(drives::DriveInterface & drive, const std::string &vid, bool force) throw (Exception) { + LabelSession::LabelSession(drives::DriveInterface & drive, const std::string &vid, bool force) { drive.rewind(); if(!force) { drive.spaceBlocksForward(1); //we are doing it the old CASTOR way (see usrreadlbl.c) @@ -59,7 +59,7 @@ namespace castor { drive.writeSyncFileMarks(1); } - ReadSession::ReadSession(drives::DriveInterface & drive, const std::string &vid) throw (Exception) : m_drive(drive), m_vid(vid), m_corrupted(false), m_locked(false), m_fseq(1), m_currentFilePart(Header) { + ReadSession::ReadSession(drives::DriveInterface & drive, const std::string &vid) : m_drive(drive), m_vid(vid), m_corrupted(false), m_locked(false), m_fseq(1), m_currentFilePart(Header) { m_drive.rewind(); VOL1 vol1; m_drive.readExactBlock((void * )&vol1, sizeof(vol1), "[ReadSession::ReadSession()] - Reading VOL1"); @@ -71,7 +71,7 @@ namespace castor { HeaderChecker::checkVOL1(vol1, vid); //after which we are at the end of VOL1 header (i.e. beginning of HDR1 of the first file) on success, or at BOT in case of exception } - void HeaderChecker::checkVOL1(const VOL1 &vol1, const std::string &volId) throw (Exception) { + void HeaderChecker::checkVOL1(const VOL1 &vol1, const std::string &volId) { if(vol1.getVSN().compare(volId)) { std::stringstream ex_str; ex_str << "[HeaderChecker::checkVOL1()] - VSN of tape (" << vol1.getVSN() << ") is not the one requested (" << volId << ")"; @@ -81,7 +81,7 @@ namespace castor { ReadFile::ReadFile(ReadSession *rs, const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) - throw (Exception) : m_currentBlockSize(0), m_session(rs) + : m_currentBlockSize(0), m_session(rs) { if(m_session->isCorrupted()) { throw SessionCorrupted(); @@ -90,12 +90,12 @@ namespace castor { position(fileToRecall); } - ReadFile::~ReadFile() throw () { + ReadFile::~ReadFile() throw() { m_session->release(); } bool HeaderChecker::checkHeaderNumericalField(const std::string &headerField, - const uint64_t value, const headerBase base) throw (Exception) { + const uint64_t value, const headerBase base) { uint64_t res = 0; std::stringstream field_converter; field_converter << headerField; @@ -117,7 +117,7 @@ namespace castor { void HeaderChecker::checkHDR1(const HDR1 &hdr1, const castor::tape::tapegateway::FileToRecallStruct &filetoRecall, - const std::string &volId) throw (Exception) { + const std::string &volId) { if(!checkHeaderNumericalField(hdr1.getFileId(), filetoRecall.fileid(), hexadecimal)) { // the nsfileid stored in HDR1 as an hexadecimal string . The one in @@ -139,7 +139,7 @@ namespace castor { } void HeaderChecker::checkUHL1(const UHL1 &uhl1, - const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) throw (Exception) { + const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) { if(!checkHeaderNumericalField(uhl1.getfSeq(), fileToRecall.fseq(), decimal)) { std::stringstream ex_str; ex_str << "[HeaderChecker::checkUHL1] - Invalid fseq detected in uhl1: \"" @@ -148,7 +148,7 @@ namespace castor { } } - void HeaderChecker::checkUTL1(const UTL1 &utl1, const uint32_t fseq) throw (Exception) { + void HeaderChecker::checkUTL1(const UTL1 &utl1, const uint32_t fseq) { if(!checkHeaderNumericalField(utl1.getfSeq(), (uint64_t)fseq, decimal)) { std::stringstream ex_str; ex_str << "[HeaderChecker::checkUTL1] - Invalid fseq detected in utl1: \"" @@ -169,7 +169,7 @@ namespace castor { ftr.setBlockId3((blockId) & 0xFF); } - void ReadFile::setBlockSize(const UHL1 &uhl1) throw (Exception) { + void ReadFile::setBlockSize(const UHL1 &uhl1) { m_currentBlockSize = (size_t)atol(uhl1.getBlockSize().c_str()); if(m_currentBlockSize<1) { std::stringstream ex_str; @@ -179,7 +179,7 @@ namespace castor { } void ReadFile::position( - const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) throw (Exception) { + const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) { if(0==fileToRecall.fileid() or fileToRecall.fseq()<1) { std::stringstream err; err << "Unexpected fileId in ReadFile::position (expected != 0, got: " @@ -257,7 +257,7 @@ namespace castor { setBlockSize(uhl1); } - size_t ReadFile::getBlockSize() throw (Exception) { + size_t ReadFile::getBlockSize() { if(m_currentBlockSize<1) { std::stringstream ex_str; ex_str << "[ReadFile::getBlockSize] - Invalid block size: " << m_currentBlockSize; @@ -266,7 +266,7 @@ namespace castor { return m_currentBlockSize; } - size_t ReadFile::read(void *data, const size_t size) throw (Exception) { + size_t ReadFile::read(void *data, const size_t size) { if(size!=m_currentBlockSize) { throw WrongBlockSize(); } @@ -301,7 +301,7 @@ namespace castor { return bytes_read; } - WriteSession::WriteSession(drives::DriveInterface & drive, const std::string &volId, const uint32_t last_fseq, const bool compression) throw (Exception) : m_drive(drive), m_vid(volId), m_compressionEnabled(compression), m_corrupted(false), m_locked(false) { + WriteSession::WriteSession(drives::DriveInterface & drive, const std::string &volId, const uint32_t last_fseq, const bool compression) : m_drive(drive), m_vid(volId), m_compressionEnabled(compression), m_corrupted(false), m_locked(false) { if(!volId.compare("")) { throw castor::exception::InvalidArgument(); @@ -350,7 +350,7 @@ namespace castor { setHostName(); } - void WriteSession::setHostName() throw (Exception) { + void WriteSession::setHostName() { char hostname_cstr[max_unix_hostname_length]; castor::exception::Errnum::throwOnMinusOne(gethostname(hostname_cstr, max_unix_hostname_length), "Failed gethostname() in WriteFile::setHostName"); m_hostName = hostname_cstr; @@ -358,7 +358,7 @@ namespace castor { m_hostName = m_hostName.substr(0, m_hostName.find(".")); } - void WriteSession::setSiteName() throw (Exception) { + void WriteSession::setSiteName() { std::ifstream resolv; resolv.exceptions(std::ifstream::failbit|std::ifstream::badbit); try { @@ -382,7 +382,7 @@ namespace castor { WriteFile::WriteFile(WriteSession *ws, const castor::tape::tapegateway::FileToMigrateStruct & ftm, - const size_t blockSize) throw (Exception) : + const size_t blockSize) : m_currentBlockSize(blockSize), m_session(ws), m_fileToMigrate(ftm), m_open(false), m_nonzeroFileWritten(false), m_numberOfBlocks(0) { @@ -417,7 +417,7 @@ namespace castor { m_open=true; } - uint32_t WriteFile::getPosition() throw (Exception) { + uint32_t WriteFile::getPosition() { return m_session->m_drive.getPositionInfo().currentPosition; } @@ -426,7 +426,7 @@ namespace castor { } - void WriteFile::write(const void *data, const size_t size) throw (Exception) { + void WriteFile::write(const void *data, const size_t size) { m_session->m_drive.writeBlock(data, size); if(size>0) { m_nonzeroFileWritten = true; @@ -434,7 +434,7 @@ namespace castor { } } - void WriteFile::close() throw (Exception) { + void WriteFile::close() { if(!m_open) { m_session->setCorrupted(); throw FileClosedTwice(); @@ -463,7 +463,7 @@ namespace castor { m_open=false; } - WriteFile::~WriteFile() throw () { + WriteFile::~WriteFile() throw() { if(m_open) { m_session->setCorrupted(); } @@ -474,20 +474,20 @@ namespace castor { namespace diskFile { //toy example using rfio, will not use rfio in production probably xroot or ceph protocols - ReadFile::ReadFile(const std::string &url) throw (Exception) { + ReadFile::ReadFile(const std::string &url) { m_fd = rfio_open64((char *)url.c_str(), O_RDONLY); castor::exception::SErrnum::throwOnMinusOne(m_fd, "Failed rfio_open64() in diskFile::ReadFile::ReadFile"); } - size_t ReadFile::read(void *data, const size_t size) throw (Exception) { + size_t ReadFile::read(void *data, const size_t size) { return rfio_read(m_fd, data, size); } - ReadFile::~ReadFile() throw () { + ReadFile::~ReadFile() throw() { rfio_close(m_fd); } - WriteFile::WriteFile(const std::string &url) throw (Exception) : closeTried(false){ + WriteFile::WriteFile(const std::string &url) : closeTried(false){ m_fd = rfio_open64((char *)url.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0666); /* * The O_TRUNC flag is here to prevent file corruption in case retrying to write a file to disk. @@ -499,16 +499,16 @@ namespace castor { castor::exception::SErrnum::throwOnMinusOne(m_fd, "Failed rfio_open64() in diskFile::WriteFile::WriteFile"); } - void WriteFile::write(const void *data, const size_t size) throw (Exception) { + void WriteFile::write(const void *data, const size_t size) { rfio_write(m_fd, (void *)data, size); } - void WriteFile::close() throw (Exception) { + void WriteFile::close() { closeTried=true; castor::exception::Errnum::throwOnMinusOne(rfio_close(m_fd), "Failed rfio_close() in diskFile::WriteFile::close"); } - WriteFile::~WriteFile() throw () { + WriteFile::~WriteFile() throw() { if(!closeTried){ rfio_close(m_fd); } diff --git a/castor/tape/tapeserver/file/File.hpp b/castor/tape/tapeserver/file/File.hpp index 0c3eac5699ffed5e8d644685f731a0dad7548331..b7f8ddf21ee07e6ce2e503aad85668926ff884e6 100644 --- a/castor/tape/tapeserver/file/File.hpp +++ b/castor/tape/tapeserver/file/File.hpp @@ -105,7 +105,7 @@ namespace castor { */ static void checkHDR1(const HDR1 &hdr1, const castor::tape::tapegateway::FileToRecallStruct &fileToRecall, - const std::string &volId) throw (Exception); + const std::string &volId) ; /** * Checks the uhl1 @@ -114,21 +114,21 @@ namespace castor { */ static void checkUHL1(const UHL1 &uhl1, const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) - throw (Exception); + ; /** * Checks the utl1 * @param utl1: the utl1 trailer of the current file * @param fseq: the file sequence number of the current file */ - static void checkUTL1(const UTL1 &utl1, const uint32_t fseq) throw (Exception); + static void checkUTL1(const UTL1 &utl1, const uint32_t fseq) ; /** * Checks the vol1 * @param vol1: the vol1 header of the current file * @param volId: the volume id of the tape in the drive */ - static void checkVOL1(const VOL1 &vol1, const std::string &volId) throw (Exception); + static void checkVOL1(const VOL1 &vol1, const std::string &volId) ; private: typedef enum { @@ -146,7 +146,7 @@ namespace castor { * @return true if the header field matches the numerical value, false otherwise */ static bool checkHeaderNumericalField(const std::string &headerField, - const uint64_t value, const headerBase base = decimal) throw (Exception); + const uint64_t value, const headerBase base = decimal) ; }; /** @@ -174,7 +174,7 @@ namespace castor { * @param vid: volume name of the tape we would like to read from * @param force: force labeling even if tape is not empty */ - LabelSession(drives::DriveInterface & drive, const std::string &vid, bool force) throw (Exception); + LabelSession(drives::DriveInterface & drive, const std::string &vid, bool force) ; }; /** @@ -194,7 +194,7 @@ namespace castor { * @param drive: drive object to which we bind the session * @param vid: volume name of the tape we would like to read from */ - ReadSession(drives::DriveInterface & drive, const std::string &vid) throw (Exception); + ReadSession(drives::DriveInterface & drive, const std::string &vid) ; /** * DriveGeneric object referencing the drive used during this read session @@ -214,7 +214,7 @@ namespace castor { return m_corrupted; } - void lock() throw (Exception) { + void lock() { if(m_locked) { throw SessionAlreadyInUse(); } @@ -283,19 +283,19 @@ namespace castor { */ ReadFile(ReadSession *rs, const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) - throw (Exception); + ; /** * Destructor of the ReadFile. It will release the lock on the read session. */ - ~ReadFile() throw (); + ~ReadFile() throw(); /** * After positioning at the beginning of a file for readings, this function * allows the reader to know which block sizes to provide. * @return the block size in bytes. */ - size_t getBlockSize() throw (Exception); + size_t getBlockSize() ; /** * Reads data from the file. The buffer should be equal to or bigger than the @@ -304,7 +304,7 @@ namespace castor { * @param size: size of the buffer * @return The amount of data actually copied. Zero at end of file. */ - size_t read(void *data, const size_t size) throw (Exception); + size_t read(void *data, const size_t size) ; private: @@ -317,14 +317,14 @@ namespace castor { */ void position( const castor::tape::tapegateway::FileToRecallStruct &fileToRecall) - throw (Exception); + ; /** * Set the block size member using the info contained within the uhl1 * @param uhl1: the uhl1 header of the current file * @param fileInfo: the Information structure of the current file */ - void setBlockSize(const UHL1 &uhl1) throw (Exception); + void setBlockSize(const UHL1 &uhl1) ; /** * Block size in Bytes of the current file @@ -357,7 +357,7 @@ namespace castor { * @param last_fseq: fseq of the last active (undeleted) file on tape * @param compression: set this to true in case the drive has compression enabled (x000GC) */ - WriteSession(drives::DriveInterface & drive, const std::string &vid, const uint32_t last_fseq, const bool compression) throw (Exception); + WriteSession(drives::DriveInterface & drive, const std::string &vid, const uint32_t last_fseq, const bool compression) ; /** * DriveGeneric object referencing the drive used during this write session @@ -390,7 +390,7 @@ namespace castor { return m_corrupted; } - void lock() throw (Exception) { + void lock() { if(m_locked) { throw SessionAlreadyInUse(); } @@ -412,12 +412,12 @@ namespace castor { /** * looks for the site name in /etc/resolv.conf in the search line and saves the upper-cased value in siteName */ - void setSiteName() throw (Exception); + void setSiteName() ; /** * uses gethostname to get the upper-cased hostname without the domain name */ - void setHostName() throw (Exception); + void setHostName() ; /** * The following two variables are needed when writing the headers and trailers, sitename is grabbed from /etc/resolv.conf @@ -452,13 +452,13 @@ namespace castor { */ WriteFile(WriteSession *ws, const castor::tape::tapegateway::FileToMigrateStruct & fileToMigrate, - const size_t blockSize) throw (Exception); + const size_t blockSize) ; /** * Returns the block id of the current position * @return blockId of current position */ - uint32_t getPosition() throw (Exception); + uint32_t getPosition() ; /** * Get the block size (that was set at construction time) @@ -471,18 +471,18 @@ namespace castor { * @param data: buffer to copy the data from * @param size: size of the buffer */ - void write(const void *data, const size_t size) throw (Exception); + void write(const void *data, const size_t size) ; /** * Closes the file by writing the corresponding trailer on tape * HAS TO BE CALL EXPLICITLY */ - void close() throw (Exception); + void close() ; /** * Destructor of the WriteFile object. Releases the WriteSession */ - ~WriteFile() throw (); + ~WriteFile() throw(); private: @@ -531,7 +531,7 @@ namespace castor { * Constructor of the ReadFile class. It opens the file for reading with the O_RDONLY flag. * @param url: Uniform Resource Locator of the file we want to read */ - ReadFile(const std::string &url) throw (Exception); + ReadFile(const std::string &url) ; /** * Reads data from the file. @@ -539,12 +539,12 @@ namespace castor { * @param size: size of the buffer * @return The amount of data actually copied. Zero at end of file. */ - size_t read(void *data, const size_t size) throw (Exception); + size_t read(void *data, const size_t size) ; /** * Destructor of the ReadFile class. It closes the corresponding file descriptor. */ - ~ReadFile() throw (); + ~ReadFile() throw(); private: int m_fd; @@ -557,24 +557,24 @@ namespace castor { * Constructor of the WriteFile class. It opens the file for writing with the O_WRONLY, O_CREAT and O_EXCL flags. * @param url: Uniform Resource Locator of the file we want to write */ - WriteFile(const std::string &url) throw (Exception); + WriteFile(const std::string &url) ; /** * Writes a block of data on disk * @param data: buffer to copy the data from * @param size: size of the buffer */ - void write(const void *data, const size_t size) throw (Exception); + void write(const void *data, const size_t size) ; /** * Closes the corresponding file descriptor, which may throw an exception. */ - void close() throw (Exception); + void close() ; /** * Destructor of the WriteFile class. */ - ~WriteFile() throw (); + ~WriteFile() throw(); private: int m_fd; diff --git a/castor/tape/tapeserver/file/Structures.cpp b/castor/tape/tapeserver/file/Structures.cpp index 10eec6cd2b3720094b6c82805c12c1c970994c49..78bd4b0e5ef517f2ea016a14801901825bc80e8c 100644 --- a/castor/tape/tapeserver/file/Structures.cpp +++ b/castor/tape/tapeserver/file/Structures.cpp @@ -87,7 +87,7 @@ void tapeFile::HDR1EOF1::fillCommon( } void tapeFile::HDR1EOF1::verifyCommon() - const throw (exceptions::Errnum) { + const { if (!cmpString(fileId, "")) throw Exception( @@ -141,7 +141,7 @@ void tapeFile::HDR1::fill( fillCommon(_fileId, _VSN, _fSeq); } -void tapeFile::HDR1::verify() const throw (Exception) { +void tapeFile::HDR1::verify() const { if (cmpString(label, "HDR1")) throw Exception(std::string("Failed verify for the HDR1: ") + tapeFile::toString(label)); @@ -160,7 +160,7 @@ void tapeFile::HDR1PRELABEL::fill(std::string _VSN) { } void tapeFile::HDR1PRELABEL::verify() - const throw (Exception) { + const { if (cmpString(label, "HDR1")) throw Exception(std::string("Failed verify for the HDR1: ") + @@ -186,7 +186,7 @@ void tapeFile::EOF1::fill( fillCommon(_fileId, _VSN, _fSeq); } -void tapeFile::EOF1::verify() const throw (Exception) { +void tapeFile::EOF1::verify() const { if (cmpString(label, "EOF1")) throw Exception(std::string("Failed verify for the EOF1: ") + tapeFile::toString(label)); @@ -212,7 +212,7 @@ void tapeFile::HDR2EOF2::fillCommon(int _blockLength, bool driveHasCompression) } void tapeFile::HDR2EOF2::verifyCommon() - const throw (Exception) { + const { if (cmpString(recordFormat, "F")) throw Exception( @@ -243,7 +243,7 @@ void tapeFile::HDR2::fill(int _blockLength, bool driveHasCompression) { fillCommon(_blockLength, driveHasCompression); } -void tapeFile::HDR2::verify() const throw (Exception) { +void tapeFile::HDR2::verify() const { if (cmpString(label, "HDR2")) throw Exception(std::string("Failed verify for the HDR2: ") + tapeFile::toString(label)); @@ -257,7 +257,7 @@ void tapeFile::EOF2::fill(int _blockLength, bool driveHasCompression) { fillCommon(_blockLength, driveHasCompression); } -void tapeFile::EOF2::verify() const throw (Exception) { +void tapeFile::EOF2::verify() const { if (cmpString(label, "EOF2")) throw Exception(std::string("Failed verify for the EOF2: ") + tapeFile::toString(label)); @@ -282,7 +282,7 @@ void tapeFile::UHL1UTL1::fillCommon(int fSeq, } void tapeFile::UHL1UTL1::verifyCommon() - const throw (Exception){ + const { if (!cmpString(actualfSeq, "")) throw Exception( @@ -329,7 +329,7 @@ void tapeFile::UHL1::fill(int fSeq, fillCommon(fSeq, blockSize, siteName, hostName, deviceInfo); } -void tapeFile::UHL1::verify() const throw (Exception) { +void tapeFile::UHL1::verify() const { if (cmpString(label, "UHL1")) throw Exception(std::string("Failed verify for the UHL1: ") + tapeFile::toString(label)); @@ -348,7 +348,7 @@ void tapeFile::UTL1::fill(int fSeq, fillCommon(fSeq, blockSize, siteName, hostName, deviceInfo); } -void tapeFile::UTL1::verify() const throw (Exception) { +void tapeFile::UTL1::verify() const { if (cmpString(label, "UTL1")) throw Exception(std::string("Failed verify for the UTL1: ") + tapeFile::toString(label)); diff --git a/castor/tape/tapeserver/file/Structures.hpp b/castor/tape/tapeserver/file/Structures.hpp index cbbd7743f7075fea975dbd28376316e7130f8d11..32e415ba5e25a2ffe97e0090b89df84a3c18bff6 100644 --- a/castor/tape/tapeserver/file/Structures.hpp +++ b/castor/tape/tapeserver/file/Structures.hpp @@ -124,7 +124,7 @@ namespace tape { * Throws an exception if the common field of the structures does * not match expectations. */ - void verifyCommon() const throw (exceptions::Errnum); + void verifyCommon() const ; public: /** @@ -171,7 +171,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; class EOF1 : public HDR1EOF1 { @@ -192,7 +192,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; class HDR1PRELABEL : public HDR1EOF1 { @@ -208,7 +208,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; // The common part of the HDR2 and EOF2 labels @@ -245,7 +245,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verifyCommon() const throw (castor::tape::Exception); + void verifyCommon() const ; public: /** * @return The block length @@ -271,7 +271,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; class EOF2 : public HDR2EOF2 { @@ -290,7 +290,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; // The common part of the UHL1 and UTL1 labels @@ -330,7 +330,7 @@ namespace tape { * Throws an exception if the common part structure does * not match expectations. */ - void verifyCommon() const throw (castor::tape::Exception); + void verifyCommon() const ; public: /** * @return The block size @@ -367,7 +367,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; class UTL1 : public UHL1UTL1 { @@ -390,7 +390,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify() const throw (castor::tape::Exception); + void verify() const ; }; template <size_t n> diff --git a/castor/tape/tapeserver/threading/ChildProcess.cpp b/castor/tape/tapeserver/threading/ChildProcess.cpp index ba3d33e81385ba67e8ca434231a15556aa352306..528b9ee879ef7af546bb4a5880a7e6861dc27272 100644 --- a/castor/tape/tapeserver/threading/ChildProcess.cpp +++ b/castor/tape/tapeserver/threading/ChildProcess.cpp @@ -27,7 +27,7 @@ #include <stdlib.h> #include <sys/wait.h> -void castor::tape::threading::ChildProcess::start(Cleanup & cleanup) throw (castor::tape::Exception) { +void castor::tape::threading::ChildProcess::start(Cleanup & cleanup) { m_pid = fork(); if (!m_pid) { /* We are the child process. Do our stuff and exit. */ @@ -52,7 +52,7 @@ void castor::tape::threading::ChildProcess::parseStatus(int status) { } } -bool castor::tape::threading::ChildProcess::running() throw (castor::tape::Exception) { +bool castor::tape::threading::ChildProcess::running() { /* Checking for a running process before starting gets an exception */ if (!m_started) throw ProcessNeverStarted(); /* If we are not aware of process exiting, let's check and collect exit code */ @@ -67,7 +67,7 @@ bool castor::tape::threading::ChildProcess::running() throw (castor::tape::Excep return !m_finished; } -void castor::tape::threading::ChildProcess::wait() throw (castor::tape::Exception) { +void castor::tape::threading::ChildProcess::wait() { /* Checking for a running process before starting gets an exception */ if (!m_started) throw ProcessNeverStarted(); if (m_finished) return; @@ -81,7 +81,7 @@ void castor::tape::threading::ChildProcess::wait() throw (castor::tape::Exceptio throw castor::tape::Exception("Process did not exit after waitpid()."); } -int castor::tape::threading::ChildProcess::exitCode() throw (castor::tape::Exception) { +int castor::tape::threading::ChildProcess::exitCode() { if (!m_started) throw ProcessNeverStarted(); if (!m_finished) { int status, ret; @@ -100,7 +100,7 @@ int castor::tape::threading::ChildProcess::exitCode() throw (castor::tape::Excep return m_exitCode; } -void castor::tape::threading::ChildProcess::kill() throw (castor::tape::Exception) { +void castor::tape::threading::ChildProcess::kill() { if (!m_started) throw ProcessNeverStarted(); ::kill(m_pid, SIGTERM); } diff --git a/castor/tape/tapeserver/threading/ChildProcess.hpp b/castor/tape/tapeserver/threading/ChildProcess.hpp index beefe7d3f2af690282399eaffde84be248a19d1d..bbd47139ea696c5ac48291311cc816b665e1bad8 100644 --- a/castor/tape/tapeserver/threading/ChildProcess.hpp +++ b/castor/tape/tapeserver/threading/ChildProcess.hpp @@ -73,15 +73,15 @@ namespace threading { virtual ~ChildProcess() { if (m_started && !m_finished) kill(); }; /** start function, taking as an argument a callback for parent's * resources cleanup. A child process can only be fired once. */ - void start(Cleanup & cleanup) throw (castor::tape::Exception); + void start(Cleanup & cleanup) ; /** Check running status */ - bool running() throw (castor::tape::Exception); + bool running() ; /** Wait for completion */ - void wait() throw (castor::tape::Exception); + void wait() ; /** collect exit code */ - int exitCode() throw (castor::tape::Exception); + int exitCode() ; /** kill */ - void kill() throw (castor::tape::Exception); + void kill() ; private: pid_t m_pid; /** Was the process started? */ diff --git a/castor/tape/tapeserver/threading/Threading.cpp b/castor/tape/tapeserver/threading/Threading.cpp index 1fc9ae55db6f40a9758d30b88fe8008fded8f3d8..03569a5540a77630f9821c7676a3ff8b0da37f24 100644 --- a/castor/tape/tapeserver/threading/Threading.cpp +++ b/castor/tape/tapeserver/threading/Threading.cpp @@ -34,7 +34,7 @@ /* Mutex */ -castor::tape::threading::Mutex::Mutex() throw (castor::exception::Exception) { +castor::tape::threading::Mutex::Mutex() { pthread_mutexattr_t attr; castor::exception::Errnum::throwOnReturnedErrno( pthread_mutexattr_init(&attr), @@ -59,7 +59,7 @@ castor::tape::threading::Mutex::~Mutex() { pthread_mutex_destroy(&m_mutex); } -void castor::tape::threading::Mutex::lock() throw (castor::exception::Exception) { +void castor::tape::threading::Mutex::lock() { castor::exception::Errnum::throwOnReturnedErrno( pthread_mutex_lock(&m_mutex), "Error from pthread_mutex_lock in castor::tape::threading::Mutex::lock()"); @@ -67,7 +67,7 @@ void castor::tape::threading::Mutex::lock() throw (castor::exception::Exception) /* PosixSemaphore */ castor::tape::threading::PosixSemaphore::PosixSemaphore(int initial) -throw (castor::exception::Exception) { + { castor::exception::Errnum::throwOnReturnedErrno( sem_init(&m_sem, 0, initial), "Error from sem_init in castor::tape::threading::PosixSemaphore::PosixSemaphore()"); @@ -82,7 +82,7 @@ castor::tape::threading::PosixSemaphore::~PosixSemaphore() { } void castor::tape::threading::PosixSemaphore::acquire() -throw (castor::exception::Exception) { + { int ret; /* If we receive EINTR, we should just keep trying (signal interruption) */ while((ret = sem_wait(&m_sem)) && EINTR == errno) {} @@ -92,7 +92,7 @@ throw (castor::exception::Exception) { } bool castor::tape::threading::PosixSemaphore::tryAcquire() -throw (castor::exception::Exception) { + { int ret = sem_trywait(&m_sem); if (!ret) return true; if (ret && EAGAIN == errno) return false; @@ -103,7 +103,7 @@ throw (castor::exception::Exception) { } void castor::tape::threading::PosixSemaphore::release(int n) -throw (castor::exception::Exception) { + { for (int i=0; i<n; i++) { MutexLocker ml(&m_mutexPosterProtection); castor::exception::Errnum::throwOnNonZero(sem_post(&m_sem), @@ -112,7 +112,7 @@ throw (castor::exception::Exception) { } castor::tape::threading::CondVarSemaphore::CondVarSemaphore(int initial) -throw (castor::exception::Exception): +: m_value(initial) { castor::exception::Errnum::throwOnReturnedErrno( pthread_cond_init(&m_cond, NULL), @@ -133,7 +133,7 @@ castor::tape::threading::CondVarSemaphore::~CondVarSemaphore() { } void castor::tape::threading::CondVarSemaphore::acquire() -throw (castor::exception::Exception) { + { castor::exception::Errnum::throwOnReturnedErrno( pthread_mutex_lock(&m_mutex), "Error from pthread_mutex_lock in castor::tape::threading::CondVarSemaphore::acquire()"); @@ -149,7 +149,7 @@ throw (castor::exception::Exception) { } bool castor::tape::threading::CondVarSemaphore::tryAcquire() -throw (castor::exception::Exception) { + { bool ret; castor::exception::Errnum::throwOnReturnedErrno( pthread_mutex_lock(&m_mutex), @@ -167,7 +167,7 @@ throw (castor::exception::Exception) { } void castor::tape::threading::CondVarSemaphore::release(int n) -throw (castor::exception::Exception) { + { for (int i=0; i<n; i++) { castor::exception::Errnum::throwOnReturnedErrno( pthread_mutex_lock(&m_mutex), @@ -183,14 +183,14 @@ throw (castor::exception::Exception) { } void castor::tape::threading::Thread::start() -throw (castor::exception::Exception) { + { castor::exception::Errnum::throwOnReturnedErrno( pthread_create(&m_thread, NULL, pthread_runner, this), "Error from pthread_create in castor::tape::threading::Thread::start()"); } void castor::tape::threading::Thread::wait() -throw (castor::exception::Exception) { + { castor::exception::Errnum::throwOnReturnedErrno( pthread_join(m_thread, NULL), "Error from pthread_join in castor::tape::threading::Thread::wait()"); diff --git a/castor/tape/tapeserver/threading/Threading.hpp b/castor/tape/tapeserver/threading/Threading.hpp index 71a1c8b18a5db3fe31ad32d608ce104c35d72d35..c1549028d2ec026f3b55ae1e669ed14990e07ee6 100644 --- a/castor/tape/tapeserver/threading/Threading.hpp +++ b/castor/tape/tapeserver/threading/Threading.hpp @@ -38,10 +38,10 @@ namespace threading { */ class Mutex { public: - Mutex() throw (castor::exception::Exception); + Mutex() ; ~Mutex(); - void lock() throw (castor::exception::Exception); - void unlock() throw (castor::exception::Exception) { + void lock() ; + void unlock() { castor::exception::Errnum::throwOnReturnedErrno( pthread_mutex_unlock(&m_mutex), "Error from pthread_mutex_unlock in castor::tape::threading::Mutex::unlock()"); @@ -58,7 +58,7 @@ namespace threading { */ class MutexLocker { public: - MutexLocker(Mutex * m) throw (castor::exception::Exception):m_mutex(m) {m->lock();} + MutexLocker(Mutex * m) :m_mutex(m) {m->lock();} ~MutexLocker() { try { m_mutex->unlock(); } catch (...) {} } private: Mutex * m_mutex; @@ -69,11 +69,11 @@ namespace threading { */ class PosixSemaphore { public: - PosixSemaphore(int initial = 0) throw (castor::exception::Exception); + PosixSemaphore(int initial = 0) ; ~PosixSemaphore(); - void acquire() throw (castor::exception::Exception); - bool tryAcquire() throw (castor::exception::Exception); - void release(int n=1) throw (castor::exception::Exception); + void acquire() ; + bool tryAcquire() ; + void release(int n=1) ; private: sem_t m_sem; /* this mutex protects against destruction unser the feet of the last @@ -87,11 +87,11 @@ namespace threading { */ class CondVarSemaphore { public: - CondVarSemaphore(int initial = 0) throw (castor::exception::Exception); + CondVarSemaphore(int initial = 0) ; ~CondVarSemaphore(); - void acquire() throw (castor::exception::Exception); - bool tryAcquire() throw (castor::exception::Exception); - void release(int n=1) throw (castor::exception::Exception); + void acquire() ; + bool tryAcquire() ; + void release(int n=1) ; private: pthread_cond_t m_cond; pthread_mutex_t m_mutex; @@ -130,8 +130,8 @@ namespace threading { public: Thread(): m_hadException(false), m_what("") {} virtual ~Thread () {} - void start() throw (castor::exception::Exception); - void wait() throw (castor::exception::Exception); + void start() ; + void wait() ; protected: virtual void run () = 0; private: diff --git a/castor/tape/tpcp/DumpTpCommand.cpp b/castor/tape/tpcp/DumpTpCommand.cpp index feff5fe739f201213011f6aad7854b972424762b..89fe3ea14e9e9c3a2ddbdc613702cbbf558b407d 100644 --- a/castor/tape/tpcp/DumpTpCommand.cpp +++ b/castor/tape/tpcp/DumpTpCommand.cpp @@ -102,7 +102,7 @@ void castor::tape::tpcp::DumpTpCommand::usage(std::ostream &os) const throw() { // parseCommandLine //------------------------------------------------------------------------------ void castor::tape::tpcp::DumpTpCommand::parseCommandLine(const int argc, - char **argv) throw(castor::exception::Exception) { + char **argv) { static struct option longopts[] = { {"debug" , 0, NULL, 'd'}, @@ -335,7 +335,7 @@ void castor::tape::tpcp::DumpTpCommand::parseCommandLine(const int argc, // checkAccessToDisk //------------------------------------------------------------------------------ void castor::tape::tpcp::DumpTpCommand::checkAccessToDisk() - const throw (castor::exception::Exception) { + const { // There are no disk files when making a dump of tape, therefore throw no // exceptions. } @@ -345,7 +345,7 @@ void castor::tape::tpcp::DumpTpCommand::checkAccessToDisk() // checkAccessToTape //------------------------------------------------------------------------------ void castor::tape::tpcp::DumpTpCommand::checkAccessToTape() - const throw (castor::exception::Exception) { + const { const bool userIsTapeOperator = Cupv_check(m_userId, m_groupId, m_hostname, "TAPE_SERVERS", P_TAPE_OPERATOR) == 0 || @@ -380,7 +380,7 @@ void castor::tape::tpcp::DumpTpCommand::checkAccessToTape() // requestDriveFromVdqm //------------------------------------------------------------------------------ void castor::tape::tpcp::DumpTpCommand::requestDriveFromVdqm( - char *const tapeServer) throw(castor::exception::Exception) { + char *const tapeServer) { TpcpCommand::requestDriveFromVdqm(WRITE_DISABLE, tapeServer); } @@ -391,7 +391,7 @@ void castor::tape::tpcp::DumpTpCommand::requestDriveFromVdqm( void castor::tape::tpcp::DumpTpCommand::sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception) { + const { castor::tape::tapegateway::Volume volumeMsg; volumeMsg.setVid(m_vmgrTapeInfo.vid); volumeMsg.setClientType(castor::tape::tapegateway::DUMP_TP); @@ -412,7 +412,7 @@ void castor::tape::tpcp::DumpTpCommand::sendVolumeToTapeBridge( // performTransfer //------------------------------------------------------------------------------ void castor::tape::tpcp::DumpTpCommand::performTransfer() - throw (castor::exception::Exception) { + { // Spin in the wait for message and dispatch handler loop until there is no // more work @@ -434,7 +434,7 @@ void castor::tape::tpcp::DumpTpCommand::performTransfer() //------------------------------------------------------------------------------ bool castor::tape::tpcp::DumpTpCommand::dispatchMsgHandler( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { switch(obj->type()) { case OBJ_DumpParametersRequest: return handleDumpParametersRequest(obj, sock); @@ -471,7 +471,7 @@ bool castor::tape::tpcp::DumpTpCommand::dispatchMsgHandler( //------------------------------------------------------------------------------ bool castor::tape::tpcp::DumpTpCommand::handleDumpParametersRequest( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::DumpParametersRequest *msg = NULL; @@ -505,7 +505,7 @@ bool castor::tape::tpcp::DumpTpCommand::handleDumpParametersRequest( //------------------------------------------------------------------------------ bool castor::tape::tpcp::DumpTpCommand::handleDumpNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::DumpNotification *msg = NULL; @@ -536,7 +536,7 @@ bool castor::tape::tpcp::DumpTpCommand::handleDumpNotification( //------------------------------------------------------------------------------ bool castor::tape::tpcp::DumpTpCommand::handleEndNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handleEndNotification(obj, sock); } @@ -547,7 +547,7 @@ bool castor::tape::tpcp::DumpTpCommand::handleEndNotification( //------------------------------------------------------------------------------ bool castor::tape::tpcp::DumpTpCommand::handleEndNotificationErrorReport( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handleEndNotificationErrorReport(obj,sock); } @@ -558,7 +558,7 @@ bool castor::tape::tpcp::DumpTpCommand::handleEndNotificationErrorReport( //------------------------------------------------------------------------------ bool castor::tape::tpcp::DumpTpCommand::handlePingNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handlePingNotification(obj,sock); } diff --git a/castor/tape/tpcp/DumpTpCommand.hpp b/castor/tape/tpcp/DumpTpCommand.hpp index ac52ddd4c89ecacf86e457e2e01b8f42e6fbd23b..dd41149efcd65a6547df37a24f9735fa208d9443 100644 --- a/castor/tape/tpcp/DumpTpCommand.hpp +++ b/castor/tape/tpcp/DumpTpCommand.hpp @@ -63,7 +63,7 @@ protected: * @param argv Argument vector from the executable's entry function: main(). */ void parseCommandLine(const int argc, char **argv) - throw(castor::exception::Exception); + ; /** * Checks the disk files can be accessed correctly. @@ -71,7 +71,7 @@ protected: * @throw A castor::exception::Exception exception if the disk files cannot * be accessed correctly. */ - void checkAccessToDisk() const throw(castor::exception::Exception); + void checkAccessToDisk() const ; /** * Checks the tape can be accessed. @@ -79,7 +79,7 @@ protected: * @throw A castor::exception::Exception exception if the tape cannot be * accessed. */ - void checkAccessToTape() const throw(castor::exception::Exception); + void checkAccessToTape() const ; /** * Request a drive connected to the specified tape-server from the VDQM. @@ -89,7 +89,7 @@ protected: * scheduling of the VDQM. */ void requestDriveFromVdqm(char *const tapeServer) - throw(castor::exception::Exception); + ; /** * Sends the volume message to the tapebridged daemon. @@ -102,12 +102,12 @@ protected: void sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception); + const ; /** * Performs the tape copy whether it be DUMP, READ or WRITE. */ - void performTransfer() throw(castor::exception::Exception); + void performTransfer() ; /** * Dispatches the appropriate handler for the specified tape-gateway message. @@ -118,7 +118,7 @@ protected: * @return True if there is more work to be done, else false. */ bool dispatchMsgHandler(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; private: @@ -131,7 +131,7 @@ private: * @return True if there is more work to be done else false. */ bool handleDumpParametersRequest(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * DumpNotification message handler. @@ -141,7 +141,7 @@ private: * @return True if there is more work to be done else false. */ bool handleDumpNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotification message handler. @@ -151,7 +151,7 @@ private: * @return True if there is more work to be done else false. */ bool handleEndNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotificationErrorReport message handler. @@ -161,7 +161,7 @@ private: * @return True if there is more work to be done else false. */ bool handleEndNotificationErrorReport(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * PingNotification message handler. @@ -171,7 +171,7 @@ private: * @return True if there is more work to be done else false. */ bool handlePingNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; }; // class DumpTpCommand diff --git a/castor/tape/tpcp/ReadTpCommand.cpp b/castor/tape/tpcp/ReadTpCommand.cpp index 357d4a0bb7c1be75f4ecfe8edaa06fdc7a72629d..bcb869ce547d71974853c78b4749bed2b7276b4b 100644 --- a/castor/tape/tpcp/ReadTpCommand.cpp +++ b/castor/tape/tpcp/ReadTpCommand.cpp @@ -112,7 +112,7 @@ void castor::tape::tpcp::ReadTpCommand::usage(std::ostream &os) const throw() { // parseCommandLine //------------------------------------------------------------------------------ void castor::tape::tpcp::ReadTpCommand::parseCommandLine(const int argc, - char **argv) throw(castor::exception::Exception) { + char **argv) { static struct option longopts[] = { {"debug" , 0, NULL, 'd'}, @@ -316,7 +316,7 @@ void castor::tape::tpcp::ReadTpCommand::parseCommandLine(const int argc, // checkAccessToDisk //------------------------------------------------------------------------------ void castor::tape::tpcp::ReadTpCommand::checkAccessToDisk() - const throw (castor::exception::Exception) { + const { // If there are no disk files then throw no exceptions and return if(m_cmdLine.nodataSet) { return; @@ -387,7 +387,7 @@ void castor::tape::tpcp::ReadTpCommand::checkAccessToDisk() // checkAccessToTape //------------------------------------------------------------------------------ void castor::tape::tpcp::ReadTpCommand::checkAccessToTape() - const throw (castor::exception::Exception) { + const { const bool userIsTapeOperator = Cupv_check(m_userId, m_groupId, m_hostname, "TAPE_SERVERS", P_TAPE_OPERATOR) == 0 || @@ -422,7 +422,7 @@ void castor::tape::tpcp::ReadTpCommand::checkAccessToTape() // requestDriveFromVdqm //------------------------------------------------------------------------------ void castor::tape::tpcp::ReadTpCommand::requestDriveFromVdqm( - char *const tapeServer) throw(castor::exception::Exception) { + char *const tapeServer) { TpcpCommand::requestDriveFromVdqm(WRITE_DISABLE, tapeServer); } @@ -433,7 +433,7 @@ void castor::tape::tpcp::ReadTpCommand::requestDriveFromVdqm( void castor::tape::tpcp::ReadTpCommand::sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception) { + const { castor::tape::tapegateway::Volume volumeMsg; volumeMsg.setVid(m_vmgrTapeInfo.vid); volumeMsg.setClientType(castor::tape::tapegateway::READ_TP); @@ -454,7 +454,7 @@ void castor::tape::tpcp::ReadTpCommand::sendVolumeToTapeBridge( // performTransfer //------------------------------------------------------------------------------ void castor::tape::tpcp::ReadTpCommand::performTransfer() - throw (castor::exception::Exception) { + { m_tapeFseqSequence.reset(&m_cmdLine.tapeFseqRanges); @@ -509,7 +509,7 @@ void castor::tape::tpcp::ReadTpCommand::performTransfer() //------------------------------------------------------------------------------ bool castor::tape::tpcp::ReadTpCommand::dispatchMsgHandler( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { switch(obj->type()) { case OBJ_FilesToRecallListRequest: return handleFilesToRecallListRequest(obj, sock); @@ -545,7 +545,7 @@ bool castor::tape::tpcp::ReadTpCommand::dispatchMsgHandler( // countNbRangesWithEnd //------------------------------------------------------------------------------ unsigned int castor::tape::tpcp::ReadTpCommand::countNbRangesWithEnd() - throw (castor::exception::Exception) { + { unsigned int count = 0; @@ -567,7 +567,7 @@ unsigned int castor::tape::tpcp::ReadTpCommand::countNbRangesWithEnd() //------------------------------------------------------------------------------ bool castor::tape::tpcp::ReadTpCommand::handleFilesToRecallListRequest( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { const tapegateway::FilesToRecallListRequest *msg = NULL; @@ -600,7 +600,7 @@ bool castor::tape::tpcp::ReadTpCommand::handleFilesToRecallListRequest( // Notify the tapebridge about the exception and rethrow sendEndNotificationErrorReport(msg->aggregatorTransactionId(), ex.code(), ex.getMessage().str(), sock); - throw(ex); + throw ex; } } @@ -674,7 +674,7 @@ bool castor::tape::tpcp::ReadTpCommand::handleFilesToRecallListRequest( //------------------------------------------------------------------------------ bool castor::tape::tpcp::ReadTpCommand::handleFileRecallReportList( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::FileRecallReportList *msg = NULL; @@ -707,7 +707,7 @@ void castor::tape::tpcp::ReadTpCommand::handleSuccessfulRecalls( const uint64_t tapebridgeTransId, const std::vector<tapegateway::FileRecalledNotificationStruct*> &files, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { for(std::vector<tapegateway::FileRecalledNotificationStruct*>::const_iterator itor = files.begin(); itor != files.end(); itor++) { @@ -727,7 +727,7 @@ void castor::tape::tpcp::ReadTpCommand::handleSuccessfulRecalls( void castor::tape::tpcp::ReadTpCommand::handleSuccessfulRecall( const uint64_t tapebridgeTransId, const tapegateway::FileRecalledNotificationStruct &file, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception) { + castor::io::AbstractSocket &sock) { // Check the file transaction ID { FileTransferMap::iterator itor = @@ -747,7 +747,7 @@ void castor::tape::tpcp::ReadTpCommand::handleSuccessfulRecall( castor::exception::Exception ex(ECANCELED); ex.getMessage() << oss.str(); - throw(ex); + throw ex; } // Command-line user feedback @@ -782,7 +782,7 @@ void castor::tape::tpcp::ReadTpCommand::handleSuccessfulRecall( //------------------------------------------------------------------------------ bool castor::tape::tpcp::ReadTpCommand::handleEndNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handleEndNotification(obj, sock); } @@ -793,7 +793,7 @@ bool castor::tape::tpcp::ReadTpCommand::handleEndNotification( //------------------------------------------------------------------------------ bool castor::tape::tpcp::ReadTpCommand::handleEndNotificationErrorReport( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handleEndNotificationErrorReport(obj,sock); } @@ -804,7 +804,7 @@ bool castor::tape::tpcp::ReadTpCommand::handleEndNotificationErrorReport( //------------------------------------------------------------------------------ bool castor::tape::tpcp::ReadTpCommand::handlePingNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handlePingNotification(obj,sock); } diff --git a/castor/tape/tpcp/ReadTpCommand.hpp b/castor/tape/tpcp/ReadTpCommand.hpp index f64c4399f0466ae8577871db1aec707e5077c93b..ec63c9967d6fc6d87354cf2fded3bd4743a82fcc 100644 --- a/castor/tape/tpcp/ReadTpCommand.hpp +++ b/castor/tape/tpcp/ReadTpCommand.hpp @@ -69,7 +69,7 @@ protected: * @param argv Argument vector from the executable's entry function: main(). */ void parseCommandLine(const int argc, char **argv) - throw(castor::exception::Exception); + ; /** * Checks the disk files can be accessed. @@ -77,7 +77,7 @@ protected: * @throw A castor::exception::Exception exception if the disk files cannot * be accessed. */ - void checkAccessToDisk() const throw(castor::exception::Exception); + void checkAccessToDisk() const ; /** * Checks the tape can be accessed. @@ -85,7 +85,7 @@ protected: * @throw A castor::exception::Exception exception if the tape cannot be * accessed. */ - void checkAccessToTape() const throw(castor::exception::Exception); + void checkAccessToTape() const ; /** * Request a drive connected to the specified tape-server from the VDQM. @@ -95,7 +95,7 @@ protected: * scheduling of the VDQM. */ void requestDriveFromVdqm(char *const tapeServer) - throw(castor::exception::Exception); + ; /** * Sends the volume message to the tapebridged daemon. @@ -108,12 +108,12 @@ protected: void sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception); + const ; /** * Performs the tape copy whether it be DUMP, READ or WRITE. */ - void performTransfer() throw(castor::exception::Exception); + void performTransfer() ; /** * Dispatches the appropriate handler for the specified tape-gateway message. @@ -124,7 +124,7 @@ protected: * @return True if there is more work to be done, else false. */ bool dispatchMsgHandler(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; private: @@ -135,7 +135,7 @@ private: * * @return The number of ranges that contain the upper boundary "end of tape". */ - unsigned int countNbRangesWithEnd() throw (castor::exception::Exception); + unsigned int countNbRangesWithEnd() ; /** * The umask of the process. @@ -187,7 +187,7 @@ private: * @return True if there is more work to be done else false. */ bool handleFilesToRecallListRequest(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * FileRecallReportList message handler. @@ -197,7 +197,7 @@ private: * @return True if there is more work to be done else false. */ bool handleFileRecallReportList(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * Handles the specified successful recalls of files from tape. @@ -210,7 +210,7 @@ private: void handleSuccessfulRecalls( const uint64_t tapebridgeTransId, const std::vector<tapegateway::FileRecalledNotificationStruct*> &files, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * Handles the successfull recall of a file from tape. @@ -223,7 +223,7 @@ private: void handleSuccessfulRecall( const uint64_t tapebridgeTransId, const tapegateway::FileRecalledNotificationStruct &file, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotification message handler. @@ -233,7 +233,7 @@ private: * @return True if there is more work to be done else false. */ bool handleEndNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotificationErrorReport message handler. @@ -243,7 +243,7 @@ private: * @return True if there is more work to be done else false. */ bool handleEndNotificationErrorReport(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * PingNotification message handler. @@ -253,7 +253,7 @@ private: * @return True if there is more work to be done else false. */ bool handlePingNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; }; // class ReadTpCommand diff --git a/castor/tape/tpcp/TapeFileSequenceParser.cpp b/castor/tape/tpcp/TapeFileSequenceParser.cpp index cd131135c24b0f22a86b9f3aa489b18ebebaea51..82dcda49ff5546fa97b2ba92e8057d3102441350 100644 --- a/castor/tape/tpcp/TapeFileSequenceParser.cpp +++ b/castor/tape/tpcp/TapeFileSequenceParser.cpp @@ -38,7 +38,7 @@ //------------------------------------------------------------------------------ void castor::tape::tpcp::TapeFileSequenceParser::parse(char *const str, TapeFseqRangeList &tapeFseqRanges) - throw (castor::exception::InvalidArgument) { + { std::vector<std::string> rangeStrs; int nbBoundaries = 0; diff --git a/castor/tape/tpcp/TapeFileSequenceParser.hpp b/castor/tape/tpcp/TapeFileSequenceParser.hpp index f775e83396ad280e901bb41d756e8424c3045fea..7a099b3d8ed93abbaa267f215049950b25cb0c6a 100644 --- a/castor/tape/tpcp/TapeFileSequenceParser.hpp +++ b/castor/tape/tpcp/TapeFileSequenceParser.hpp @@ -54,7 +54,7 @@ public: * @param tapeFseqRanges The resulting list of tape file sequence ranges. */ static void parse(char *const str, TapeFseqRangeList &tapeFseqRanges) - throw (castor::exception::InvalidArgument); + ; }; // class TapeFileSequenceParser diff --git a/castor/tape/tpcp/TapeFseqRange.cpp b/castor/tape/tpcp/TapeFseqRange.cpp index a5f4de0b5178cdc9a7264d2d583e5b03710f264f..e389aedbaa6c7529e5499b4c80ad819e5fabe6ea 100644 --- a/castor/tape/tpcp/TapeFseqRange.cpp +++ b/castor/tape/tpcp/TapeFseqRange.cpp @@ -38,7 +38,7 @@ castor::tape::tpcp::TapeFseqRange::TapeFseqRange() throw() { // constructor //------------------------------------------------------------------------------ castor::tape::tpcp::TapeFseqRange::TapeFseqRange(const uint32_t lower, - const uint32_t upper) throw(exception::InvalidArgument) { + const uint32_t upper) { reset(lower, upper); } @@ -58,13 +58,13 @@ void castor::tape::tpcp::TapeFseqRange::reset() throw() { // reset //------------------------------------------------------------------------------ void castor::tape::tpcp::TapeFseqRange::reset(const uint32_t lower, - const uint32_t upper) throw(exception::InvalidArgument) { + const uint32_t upper) { if(lower == 0) { exception::InvalidArgument ex; ex.getMessage() << "Lower boundary must not be zero"; - throw(ex); + throw ex; } // If the upper boundary is not 0 meaning infinity and the lower boundary is @@ -76,7 +76,7 @@ void castor::tape::tpcp::TapeFseqRange::reset(const uint32_t lower, "Lower boundary must be less than or equal to the upper boundary" ": lower=" << lower << " upper=" << upper; - throw(ex); + throw ex; } m_isEmpty = false; diff --git a/castor/tape/tpcp/TapeFseqRange.hpp b/castor/tape/tpcp/TapeFseqRange.hpp index cbcd16bf4b2fb2757e19a6cedf0a5a63e0466af5..17bb7c4612836bf49b8c4109e7d033ea8a97332a 100644 --- a/castor/tape/tpcp/TapeFseqRange.hpp +++ b/castor/tape/tpcp/TapeFseqRange.hpp @@ -62,7 +62,7 @@ public: * @param upper The inclusive upper bound of the range. */ TapeFseqRange(const uint32_t lower, const uint32_t upper) - throw(exception::InvalidArgument); + ; /** * Resets the range to be an empty range. @@ -80,7 +80,7 @@ public: * @param upper The inclusive upper bound of the range. */ void reset(const uint32_t lower, const uint32_t upper) - throw(exception::InvalidArgument); + ; /** * Returns true if the range is empty. diff --git a/castor/tape/tpcp/TapeFseqRangeListSequence.cpp b/castor/tape/tpcp/TapeFseqRangeListSequence.cpp index 953ba65f428419209583327431c1a84b9db222a0..7294e33e5104c18efb214dc227450448a1704d63 100644 --- a/castor/tape/tpcp/TapeFseqRangeListSequence.cpp +++ b/castor/tape/tpcp/TapeFseqRangeListSequence.cpp @@ -31,7 +31,7 @@ // constructor //------------------------------------------------------------------------------ castor::tape::tpcp::TapeFseqRangeListSequence::TapeFseqRangeListSequence() - throw(castor::exception::Exception) { + { reset(NULL); } @@ -40,7 +40,7 @@ castor::tape::tpcp::TapeFseqRangeListSequence::TapeFseqRangeListSequence() // constructor //------------------------------------------------------------------------------ castor::tape::tpcp::TapeFseqRangeListSequence::TapeFseqRangeListSequence( - const TapeFseqRangeList *const list) throw(castor::exception::Exception) { + const TapeFseqRangeList *const list) { reset(list); } @@ -49,7 +49,7 @@ castor::tape::tpcp::TapeFseqRangeListSequence::TapeFseqRangeListSequence( // reset //------------------------------------------------------------------------------ void castor::tape::tpcp::TapeFseqRangeListSequence::reset( - const TapeFseqRangeList *const list) throw(castor::exception::Exception) { + const TapeFseqRangeList *const list) { m_list = list; if(m_list == NULL) { @@ -99,7 +99,7 @@ bool castor::tape::tpcp::TapeFseqRangeListSequence::hasMore() const throw() { // next //------------------------------------------------------------------------------ uint32_t castor::tape::tpcp::TapeFseqRangeListSequence::next() - throw(castor::exception::Exception) { + { if(!hasMore()) { castor::exception::Exception ex(ECANCELED); diff --git a/castor/tape/tpcp/TapeFseqRangeListSequence.hpp b/castor/tape/tpcp/TapeFseqRangeListSequence.hpp index a3fc28b11961e8ee9e7cb600bcd968a2088dc148..03f8b1c633ef81965613f64d1616237835b68b1e 100644 --- a/castor/tape/tpcp/TapeFseqRangeListSequence.hpp +++ b/castor/tape/tpcp/TapeFseqRangeListSequence.hpp @@ -45,7 +45,7 @@ public: * Creates an empty sequence, in other word hasMore() will always return * false. */ - TapeFseqRangeListSequence() throw(castor::exception::Exception); + TapeFseqRangeListSequence() ; /** * Constructor. @@ -54,7 +54,7 @@ public: * of tape file sequence numbers is to be generated. */ TapeFseqRangeListSequence(const TapeFseqRangeList *const list) - throw(castor::exception::Exception); + ; /** * Resets the sequence. @@ -63,7 +63,7 @@ public: * of tape file sequence numbers is to be generated. */ void reset(const TapeFseqRangeList *const list) - throw(castor::exception::Exception); + ; /** * Returns true if there is another tape file sequence number in the @@ -75,7 +75,7 @@ public: * Returns the next tape file sequence number in the sequence, or throws an * exception if there isn't one. */ - uint32_t next() throw(castor::exception::Exception); + uint32_t next() ; /** * Returns true if the sequence is finite, else false if it is infinite. diff --git a/castor/tape/tpcp/TapeFseqRangeSequence.cpp b/castor/tape/tpcp/TapeFseqRangeSequence.cpp index d70f8beaadca969c433acb28f28cbd1b0e6a3970..15cb862b4ed415ff56af3456e7f4cb4588eeaf9c 100644 --- a/castor/tape/tpcp/TapeFseqRangeSequence.cpp +++ b/castor/tape/tpcp/TapeFseqRangeSequence.cpp @@ -92,7 +92,7 @@ bool castor::tape::tpcp::TapeFseqRangeSequence::hasMore() const throw() { // next //------------------------------------------------------------------------------ uint32_t castor::tape::tpcp::TapeFseqRangeSequence::next() - throw(exception::NoValue) { + { if(!hasMore()) { exception::NoValue ex; diff --git a/castor/tape/tpcp/TapeFseqRangeSequence.hpp b/castor/tape/tpcp/TapeFseqRangeSequence.hpp index 41bf769640d51adfcc742c8bad679ab4e543c1ff..4b66a41317457a8ab745de0e6ec259efe6334931 100644 --- a/castor/tape/tpcp/TapeFseqRangeSequence.hpp +++ b/castor/tape/tpcp/TapeFseqRangeSequence.hpp @@ -74,7 +74,7 @@ public: * Returns the next tape file sequence number in the sequence, or throws * NoValue exception if there isn't one. */ - uint32_t next() throw(exception::NoValue); + uint32_t next() ; /** * Returns the number of values generated by the sequence so far. diff --git a/castor/tape/tpcp/TpcpCommand.cpp b/castor/tape/tpcp/TpcpCommand.cpp index 006854a9ec86be87f506f3e22aeefb3162355dc3..f7ed5a28246bdf5698dc302ff5088e612efb869a 100644 --- a/castor/tape/tpcp/TpcpCommand.cpp +++ b/castor/tape/tpcp/TpcpCommand.cpp @@ -85,7 +85,7 @@ bool castor::tape::tpcp::TpcpCommand::s_receivedSigint = false; // constructor //------------------------------------------------------------------------------ castor::tape::tpcp::TpcpCommand::TpcpCommand(const char *const programName) - throw () : + throw() : m_programName(programName), m_userId(getuid()), m_groupId(getgid()), @@ -128,7 +128,7 @@ castor::tape::tpcp::TpcpCommand::TpcpCommand(const char *const programName) //------------------------------------------------------------------------------ // destructor //------------------------------------------------------------------------------ -castor::tape::tpcp::TpcpCommand::~TpcpCommand() throw () { +castor::tape::tpcp::TpcpCommand::~TpcpCommand() throw() { // Do nothing } @@ -414,7 +414,7 @@ void castor::tape::tpcp::TpcpCommand::executeCommand() { castor::exception::Exception ex(ECANCELED); ex.getMessage() << "Received SIGNINT"; - throw(ex); + throw ex; // Else received a signal other than SIGINT } else { @@ -511,7 +511,7 @@ void castor::tape::tpcp::TpcpCommand::executeCommand() { // vmgrQueryTape //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::vmgrQueryTape() - throw (castor::exception::Exception) { + { const int side = 0; serrno=0; const int rc = vmgr_querytape_byte_u64(m_cmdLine.vid, side, &m_vmgrTapeInfo, @@ -531,7 +531,7 @@ void castor::tape::tpcp::TpcpCommand::vmgrQueryTape() // setupCallbackSock //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::setupCallbackSock() - throw(castor::exception::Exception) { + { const unsigned short lowPort = utils::getPortFromConfig( "TAPESERVERCLIENT", "LOWPORT", TAPEBRIDGECLIENT_LOWPORT); @@ -549,7 +549,7 @@ void castor::tape::tpcp::TpcpCommand::setupCallbackSock() //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::requestDriveFromVdqm( const int accessMode, char *const tapeServer) - throw(castor::exception::Exception) { + { // Get the port number and IP of the callback port unsigned short port = 0; @@ -614,7 +614,7 @@ void castor::tape::tpcp::TpcpCommand::requestDriveFromVdqm( // waitForMsgAndDispatchHandler //------------------------------------------------------------------------------ bool castor::tape::tpcp::TpcpCommand::waitForMsgAndDispatchHandler() - throw(castor::exception::Exception) { + { // Socket file descriptor for a callback connection from the tapebridge int connectionSockFd = 0; @@ -650,7 +650,7 @@ bool castor::tape::tpcp::TpcpCommand::waitForMsgAndDispatchHandler() castor::exception::Exception ex(ECANCELED); ex.getMessage() << "Received SIGNINT"; - throw(ex); + throw ex; // Else received a signal other than SIGINT } else { @@ -740,7 +740,7 @@ bool castor::tape::tpcp::TpcpCommand::waitForMsgAndDispatchHandler() //------------------------------------------------------------------------------ bool castor::tape::tpcp::TpcpCommand::handlePingNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::PingNotification *msg = NULL; @@ -766,7 +766,7 @@ bool castor::tape::tpcp::TpcpCommand::handlePingNotification( //------------------------------------------------------------------------------ bool castor::tape::tpcp::TpcpCommand::handleEndNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::EndNotification *msg = NULL; @@ -792,7 +792,7 @@ bool castor::tape::tpcp::TpcpCommand::handleEndNotification( //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::handleFailedTransfers( const std::vector<tapegateway::FileErrorReportStruct*> &files) - throw(castor::exception::Exception) { + { for(std::vector<tapegateway::FileErrorReportStruct*>::const_iterator itor = files.begin(); itor != files.end(); itor++) { @@ -811,7 +811,7 @@ void castor::tape::tpcp::TpcpCommand::handleFailedTransfers( //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::handleFailedTransfer( const tapegateway::FileErrorReportStruct &file) - throw(castor::exception::Exception) { + { // Command-line user feedback std::ostream &os = std::cout; @@ -838,7 +838,7 @@ void castor::tape::tpcp::TpcpCommand::handleFailedTransfer( //------------------------------------------------------------------------------ bool castor::tape::tpcp::TpcpCommand::handleEndNotificationErrorReport( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::EndNotificationErrorReport *msg = NULL; @@ -890,7 +890,7 @@ bool castor::tape::tpcp::TpcpCommand::handleEndNotificationErrorReport( // acknowledgeEndOfSession //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::acknowledgeEndOfSession() - throw(castor::exception::Exception) { + { // Socket file descriptor for a callback connection from the tapebridge int connectionSockFd = 0; @@ -928,7 +928,7 @@ void castor::tape::tpcp::TpcpCommand::acknowledgeEndOfSession() ex.getMessage() << ": Received SIGNINT"; - throw(ex); + throw ex; // Else received a signal other than SIGINT } else { @@ -1019,7 +1019,7 @@ void castor::tape::tpcp::TpcpCommand::sigintHandler(int) { // deleteVdqmVolumeRequest //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::deleteVdqmVolumeRequest() - throw(castor::exception::Exception) { + { const int rc = vdqm_DelVolumeReq(NULL, m_volReqId, m_vmgrTapeInfo.vid, m_dgn, NULL, NULL, 0); @@ -1037,7 +1037,7 @@ void castor::tape::tpcp::TpcpCommand::deleteVdqmVolumeRequest() // checkFilenameFormat //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::checkFilenameFormat() - throw(castor::exception::Exception) { + { FilenameList::iterator itor = m_filenames.begin(); // local string containing the hostname + ":" @@ -1106,7 +1106,7 @@ void castor::tape::tpcp::TpcpCommand::checkFilenameFormat() // rfioStat //------------------------------------------------------------------------------ void castor::tape::tpcp::TpcpCommand::rfioStat(const char *const path, - struct stat64 &statBuf) const throw(castor::exception::Exception) { + struct stat64 &statBuf) const { // rfio_stat64 is a smart oparation, in case of a local file, it do not use // the rfio's stat, but the local stat. To forse the use of rfio's stat we @@ -1145,6 +1145,6 @@ void castor::tape::tpcp::TpcpCommand::rfioStat(const char *const path, ex.getMessage() << "Failed to rfio_stat64 \"" << path << "\"" ": " << err_msg; - throw(ex); + throw ex; } } diff --git a/castor/tape/tpcp/TpcpCommand.hpp b/castor/tape/tpcp/TpcpCommand.hpp index 5d2aa0329f4b40f28afc14035b4cb075cae764bd..5cf1f8bafeea48ef62e3d493137adea1c13c1d2a 100644 --- a/castor/tape/tpcp/TpcpCommand.hpp +++ b/castor/tape/tpcp/TpcpCommand.hpp @@ -101,7 +101,7 @@ protected: * @param argv Argument vector from the executable's main(). */ virtual void parseCommandLine(const int argc, char **argv) - throw(castor::exception::Exception) = 0; + = 0; /** * To be implemented by sub-classes. @@ -112,7 +112,7 @@ protected: * be accessed. */ virtual void checkAccessToDisk() - const throw(castor::exception::Exception) = 0; + const = 0; /** * To be implemented by sub-classes. @@ -123,7 +123,7 @@ protected: * accessed. */ virtual void checkAccessToTape() - const throw(castor::exception::Exception) = 0; + const = 0; /** * To be implemented by sub-classes. @@ -135,7 +135,7 @@ protected: * scheduling of the VDQM. */ virtual void requestDriveFromVdqm(char *const tapeServer) - throw(castor::exception::Exception) = 0; + = 0; /** * To be implemented by sub-classes. @@ -150,14 +150,14 @@ protected: virtual void sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception) = 0; + const = 0; /** * To be implemented by sub-classes. * * Performs the tape copy whether it be DUMP, READ or WRITE. */ - virtual void performTransfer() throw(castor::exception::Exception) = 0; + virtual void performTransfer() = 0; /** * The program name. @@ -243,13 +243,13 @@ protected: * vmgr_querytape. This method converts the return value of -1 and the * serrno to an exception in the case of an error. */ - void vmgrQueryTape() throw (castor::exception::Exception); + void vmgrQueryTape() ; /** * Creates, binds and sets to listening the callback socket to be used for * callbacks from the tape-bridge daemon. */ - void setupCallbackSock() throw(castor::exception::Exception); + void setupCallbackSock() ; /** * Request a drive from the VDQM to mount the specified tape for the @@ -262,7 +262,7 @@ protected: * scheduling of the VDQM. */ void requestDriveFromVdqm(const int accessMode, char *const tapeServer) - throw(castor::exception::Exception); + ; /** * Waits for and accepts an incoming tape-bridge connection, reads in the @@ -271,7 +271,7 @@ protected: * * @return True if there is more work to be done, else false. */ - bool waitForMsgAndDispatchHandler() throw(castor::exception::Exception); + bool waitForMsgAndDispatchHandler() ; /** * To be implemented by sub-classes. @@ -284,7 +284,7 @@ protected: * @return True if there is more work to be done, else false. */ virtual bool dispatchMsgHandler(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception) = 0; + castor::io::AbstractSocket &sock) = 0; /** * PingNotification message handler. @@ -294,7 +294,7 @@ protected: * @return True if there is more work to be done else false. */ bool handlePingNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotification message handler. @@ -304,7 +304,7 @@ protected: * @return True if there is more work to be done else false. */ bool handleEndNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotificationErrorReport message handler. @@ -314,7 +314,7 @@ protected: * @return True if there is more work to be done else false. */ bool handleEndNotificationErrorReport(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * Handles the specified failed file-transfers. @@ -323,7 +323,7 @@ protected: */ void handleFailedTransfers( const std::vector<tapegateway::FileErrorReportStruct*> &files) - throw(castor::exception::Exception); + ; /** * Handles the specified failed file-transfer. @@ -331,12 +331,12 @@ protected: * @param file The failed file-transfer. */ void handleFailedTransfer(const tapegateway::FileErrorReportStruct &file) - throw(castor::exception::Exception); + ; /** * Acknowledges the end of the session to the tape-bridge. */ - void acknowledgeEndOfSession() throw(castor::exception::Exception); + void acknowledgeEndOfSession() ; /** * Convenience method for sending EndNotificationErrorReport messages to the @@ -400,7 +400,7 @@ protected: * @param statBuf The stat buffer to be passed to rfio_stat64. */ void rfioStat(const char *path, struct stat64 &statBuf) - const throw(castor::exception::Exception); + const ; private: @@ -430,7 +430,7 @@ private: /** * Deletes the specified VDQM volume request. */ - void deleteVdqmVolumeRequest() throw (castor::exception::Exception); + void deleteVdqmVolumeRequest() ; /** * The SIGINT signal handler. @@ -452,7 +452,7 @@ private: * Relative filename will be prefix by the hostaname and by the current * working directory */ - void checkFilenameFormat() throw(castor::exception::Exception); + void checkFilenameFormat() ; /** * The current working directory where tpcp command is run. diff --git a/castor/tape/tpcp/WriteTpCommand.cpp b/castor/tape/tpcp/WriteTpCommand.cpp index 885795f1bb4c7aad633069efe7e9f03aaf56f7cd..0c98fba5f950bc1cb207e6b9c145b8773e6e75c3 100644 --- a/castor/tape/tpcp/WriteTpCommand.cpp +++ b/castor/tape/tpcp/WriteTpCommand.cpp @@ -101,7 +101,7 @@ void castor::tape::tpcp::WriteTpCommand::usage(std::ostream &os) const throw() { // parseCommandLine //------------------------------------------------------------------------------ void castor::tape::tpcp::WriteTpCommand::parseCommandLine(const int argc, - char **argv) throw(castor::exception::Exception) { + char **argv) { static struct option longopts[] = { {"debug" , 0, NULL, 'd'}, @@ -245,7 +245,7 @@ void castor::tape::tpcp::WriteTpCommand::parseCommandLine(const int argc, // checkAccessToDisk //------------------------------------------------------------------------------ void castor::tape::tpcp::WriteTpCommand::checkAccessToDisk() - const throw (castor::exception::Exception) { + const { // Check that there is at least one file to be migrated if(m_filenames.size() == 0) { castor::exception::InvalidArgument ex; @@ -309,7 +309,7 @@ void castor::tape::tpcp::WriteTpCommand::checkAccessToDisk() // checkAccessToTape //------------------------------------------------------------------------------ void castor::tape::tpcp::WriteTpCommand::checkAccessToTape() - const throw(castor::exception::Exception) { + const { checkUserHasTapeWritePermission(m_vmgrTapeInfo.poolname, m_userId, m_groupId, m_hostname); @@ -338,7 +338,7 @@ void castor::tape::tpcp::WriteTpCommand::checkAccessToTape() void castor::tape::tpcp::WriteTpCommand::checkUserHasTapeWritePermission( const char *const poolName, const uid_t userId, const gid_t groupId, const char *const sourceHost) - const throw(castor::exception::PermissionDenied) { + const { // Get the owner of the pool by querying the VMGR uid_t poolUserId = 0; @@ -401,7 +401,7 @@ void castor::tape::tpcp::WriteTpCommand::checkUserHasTapeWritePermission( // requestDriveFromVdqm //------------------------------------------------------------------------------ void castor::tape::tpcp::WriteTpCommand::requestDriveFromVdqm( - char *const tapeServer) throw(castor::exception::Exception) { + char *const tapeServer) { TpcpCommand::requestDriveFromVdqm(WRITE_ENABLE, tapeServer); } @@ -412,7 +412,7 @@ void castor::tape::tpcp::WriteTpCommand::requestDriveFromVdqm( void castor::tape::tpcp::WriteTpCommand::sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception) { + const { castor::tape::tapegateway::Volume volumeMsg; volumeMsg.setVid(m_vmgrTapeInfo.vid); volumeMsg.setClientType(castor::tape::tapegateway::WRITE_TP); @@ -433,7 +433,7 @@ void castor::tape::tpcp::WriteTpCommand::sendVolumeToTapeBridge( // performTransfer //------------------------------------------------------------------------------ void castor::tape::tpcp::WriteTpCommand::performTransfer() - throw (castor::exception::Exception) { + { std::ostream &os = std::cout; @@ -498,7 +498,7 @@ void castor::tape::tpcp::WriteTpCommand::performTransfer() //------------------------------------------------------------------------------ bool castor::tape::tpcp::WriteTpCommand::dispatchMsgHandler( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { switch(obj->type()) { case OBJ_FilesToMigrateListRequest: return handleFilesToMigrateListRequest(obj, sock); @@ -535,7 +535,7 @@ bool castor::tape::tpcp::WriteTpCommand::dispatchMsgHandler( //------------------------------------------------------------------------------ bool castor::tape::tpcp::WriteTpCommand::handleFilesToMigrateListRequest( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::FilesToMigrateListRequest *msg = NULL; @@ -559,7 +559,7 @@ bool castor::tape::tpcp::WriteTpCommand::handleFilesToMigrateListRequest( // Notify the tapebridge about the exception and rethrow sendEndNotificationErrorReport(msg->aggregatorTransactionId(), ex.code(), ex.getMessage().str(), sock); - throw(ex); + throw ex; } // Create a FilesToMigrateList message for the tapebridge @@ -627,7 +627,7 @@ bool castor::tape::tpcp::WriteTpCommand::handleFilesToMigrateListRequest( //------------------------------------------------------------------------------ bool castor::tape::tpcp::WriteTpCommand::handleFileMigrationReportList( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { tapegateway::FileMigrationReportList *msg = NULL; @@ -671,7 +671,7 @@ void castor::tape::tpcp::WriteTpCommand::handleSuccessfulMigrations( const uint64_t tapebridgeTransId, const std::vector<tapegateway::FileMigratedNotificationStruct*> &files, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { for(std::vector<tapegateway::FileMigratedNotificationStruct*>::const_iterator itor = files.begin(); itor != files.end(); itor++) { @@ -691,7 +691,7 @@ void castor::tape::tpcp::WriteTpCommand::handleSuccessfulMigrations( void castor::tape::tpcp::WriteTpCommand::handleSuccessfulMigration( const uint64_t tapebridgeTransId, const tapegateway::FileMigratedNotificationStruct &file, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception) { + castor::io::AbstractSocket &sock) { // Check the file transaction ID { FileTransferMap::iterator itor = @@ -711,7 +711,7 @@ void castor::tape::tpcp::WriteTpCommand::handleSuccessfulMigration( castor::exception::Exception ex(ECANCELED); ex.getMessage() << oss.str(); - throw(ex); + throw ex; } // Command-line user feedback @@ -742,7 +742,7 @@ void castor::tape::tpcp::WriteTpCommand::handleSuccessfulMigration( //------------------------------------------------------------------------------ bool castor::tape::tpcp::WriteTpCommand::handleEndNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handleEndNotification(obj, sock); } @@ -753,7 +753,7 @@ bool castor::tape::tpcp::WriteTpCommand::handleEndNotification( //------------------------------------------------------------------------------ bool castor::tape::tpcp::WriteTpCommand::handleEndNotificationErrorReport( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handleEndNotificationErrorReport(obj, sock); } @@ -764,7 +764,7 @@ bool castor::tape::tpcp::WriteTpCommand::handleEndNotificationErrorReport( //------------------------------------------------------------------------------ bool castor::tape::tpcp::WriteTpCommand::handlePingNotification( castor::IObject *const obj, castor::io::AbstractSocket &sock) - throw(castor::exception::Exception) { + { return TpcpCommand::handlePingNotification(obj,sock); } diff --git a/castor/tape/tpcp/WriteTpCommand.hpp b/castor/tape/tpcp/WriteTpCommand.hpp index 00839fdd9c838fcf874dc58e8703f57225c61ce6..6596945389c206e3d059d9546b5018f6600bec1b 100644 --- a/castor/tape/tpcp/WriteTpCommand.hpp +++ b/castor/tape/tpcp/WriteTpCommand.hpp @@ -64,7 +64,7 @@ protected: * @param argv Argument vector from the executable's entry function: main(). */ void parseCommandLine(const int argc, char **argv) - throw(castor::exception::Exception); + ; /** * Checks the disk files can be accessed. @@ -72,7 +72,7 @@ protected: * @throw A castor::exception::Exception exception if the disk files cannot * be accessed. */ - void checkAccessToDisk() const throw(castor::exception::Exception); + void checkAccessToDisk() const ; /** * Checks the tape can be accessed. @@ -80,7 +80,7 @@ protected: * @throw A castor::exception::Exception exception if the tape cannot be * accessed. */ - void checkAccessToTape() const throw(castor::exception::Exception); + void checkAccessToTape() const ; /** * Request a drive connected to the specified tape-server from the VDQM. @@ -90,7 +90,7 @@ protected: * scheduling of the VDQM. */ void requestDriveFromVdqm(char *const tapeServer) - throw(castor::exception::Exception); + ; /** * Sends the volume message to the tapebridged daemon. @@ -103,12 +103,12 @@ protected: void sendVolumeToTapeBridge( const tapegateway::VolumeRequest &volumeRequest, castor::io::AbstractTCPSocket &connection) - const throw(castor::exception::Exception); + const ; /** * Performs the tape copy whether it be DUMP, READ or WRITE. */ - void performTransfer() throw(castor::exception::Exception); + void performTransfer() ; /** * Dispatches the appropriate handler for the specified tape-gateway message. @@ -119,7 +119,7 @@ protected: * @return True if there is more work to be done, else false. */ bool dispatchMsgHandler(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; private: @@ -160,7 +160,7 @@ private: */ void checkUserHasTapeWritePermission(const char *const poolName, const uid_t userId, const gid_t groupId, const char *const sourceHost) - const throw (castor::exception::PermissionDenied); + const ; /** * FilesToMigrateListRequest message handler. @@ -170,7 +170,7 @@ private: * @return True if there is more work to be done else false. */ bool handleFilesToMigrateListRequest(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * FileMigrationReportList message handler. @@ -180,7 +180,7 @@ private: * @return True if there is more work to be done else false. */ bool handleFileMigrationReportList(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * Handles the specified successful migration of files to tape. @@ -193,7 +193,7 @@ private: void handleSuccessfulMigrations( const uint64_t tapebridgeTransId, const std::vector<tapegateway::FileMigratedNotificationStruct*> &files, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * Handles the successfull migration of a file to tape. @@ -206,7 +206,7 @@ private: void handleSuccessfulMigration( const uint64_t tapebridgeTransId, const tapegateway::FileMigratedNotificationStruct &file, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotification message handler. @@ -216,7 +216,7 @@ private: * @return True if there is more work to be done else false. */ bool handleEndNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * EndNotificationErrorReport message handler. @@ -226,7 +226,7 @@ private: * @return True if there is more work to be done else false. */ bool handleEndNotificationErrorReport(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; /** * PingNotification message handler. @@ -236,7 +236,7 @@ private: * @return True if there is more work to be done else false. */ bool handlePingNotification(castor::IObject *const obj, - castor::io::AbstractSocket &sock) throw(castor::exception::Exception); + castor::io::AbstractSocket &sock) ; }; // class WriteTpCommand diff --git a/castor/tape/utils/IndexedContainer.hpp b/castor/tape/utils/IndexedContainer.hpp index c0cb99b465ff30658c3e21d1b0d07cc30d767aea..9fb01952bd2c1ccef6fb16a203b2fe6b681c910f 100644 --- a/castor/tape/utils/IndexedContainer.hpp +++ b/castor/tape/utils/IndexedContainer.hpp @@ -103,7 +103,7 @@ public: * @param data The data to be inserted. * @return The index of the element used to store the data. */ - int insert(const T &data) throw(exception::OutOfMemory) { + int insert(const T &data) { const char *const task = "insert data into IndexedContainer"; if(m_free == NULL) { @@ -114,7 +114,7 @@ public: ": No more free elements to store data pointer: " ": maxElements=" << m_nbElements; - throw(ex); + ; } // Get and remove the free element from the list of free elements @@ -279,7 +279,7 @@ private: * @param index The array index of the element. * @return The data pointer. */ - Element *getElement(const int index) throw(exception::InvalidArgument) { + Element *getElement(const int index) { const char *const task = "get element from IndexContainer using index"; // Throw an exception if the index is invalid diff --git a/castor/tape/utils/utils.cpp b/castor/tape/utils/utils.cpp index 31c31ff349a0afb44e8fd3b983a8efdff914e369..888629a382c1516a5f397faffc3b04319ac0edec 100644 --- a/castor/tape/utils/utils.cpp +++ b/castor/tape/utils/utils.cpp @@ -51,7 +51,7 @@ // toHex //----------------------------------------------------------------------------- void castor::tape::utils::toHex(uint32_t number, char *buf, size_t len) - throw(castor::exception::InvalidArgument) { + { if(len < 9) { castor::exception::InvalidArgument ex; @@ -61,7 +61,7 @@ void castor::tape::utils::toHex(uint32_t number, char *buf, size_t len) ": The output string is too small: Actual=" << len << " Minimum=9"; - throw(ex); + throw ex; } int digitAsInt = 0; @@ -99,7 +99,7 @@ int castor::tape::utils::countOccurrences(const char ch, const char *str) { // toHex //----------------------------------------------------------------------------- void castor::tape::utils::toHex(const uint64_t i, char *dst, - size_t dstLen) throw(castor::exception::Exception) { + size_t dstLen) { // The largest 64-bit hexadecimal string "FFFFFFFFFFFFFFFF" would ocuppy 17 // characters (17 characters = 16 x 'F' + 1 x '\0') @@ -246,7 +246,7 @@ const char *castor::tape::utils::volumeModeToString( // drainFile //------------------------------------------------------------------------------ ssize_t castor::tape::utils::drainFile(const int fd) - throw(castor::exception::Exception) { + { char buf[1024]; @@ -276,7 +276,7 @@ ssize_t castor::tape::utils::drainFile(const int fd) // readFileIntoList //------------------------------------------------------------------------------ void castor::tape::utils::readFileIntoList(const char *const filename, - std::list<std::string> &lines) throw(castor::exception::Exception) { + std::list<std::string> &lines) { std::ifstream file(filename); @@ -305,7 +305,7 @@ void castor::tape::utils::readFileIntoList(const char *const filename, // parseFileList //------------------------------------------------------------------------------ void castor::tape::utils::parseFileList(const char *filename, - std::list<std::string> &list) throw (castor::exception::Exception) { + std::list<std::string> &list) { readFileIntoList(filename, list); @@ -445,7 +445,7 @@ unsigned short castor::tape::utils::getPortFromConfig( ": Value should be an unsigned integer greater than 0" ": Value='" << value << "'"; - throw(ex); + throw ex; } if(port == 0) { @@ -456,7 +456,7 @@ unsigned short castor::tape::utils::getPortFromConfig( ": Value should be an unsigned integer greater than 0" ": Value='" << value << "'"; - throw(ex); + throw ex; } } @@ -467,7 +467,7 @@ unsigned short castor::tape::utils::getPortFromConfig( // parseTpconfigFile //------------------------------------------------------------------------------ void castor::tape::utils::parseTpconfigFile(const char *const filename, - TpconfigLines &lines) throw (castor::exception::Exception) { + TpconfigLines &lines) { // The expected number of data-columns in a TPCONFIG data-line const unsigned int NBCOLUMNS = 7; @@ -487,7 +487,7 @@ void castor::tape::utils::parseTpconfigFile(const char *const filename, ": filename='" << filename << "'" ": " << sstrerror(savedErrno); - throw(ex); + throw ex; } } @@ -545,7 +545,7 @@ void castor::tape::utils::parseTpconfigFile(const char *const filename, ": actualNbColumns=" << columns.size() << ": lineNb=" << lineNb; - throw(ex); + throw ex; } // Store the value of the data-coulmns in the output list parameter @@ -571,7 +571,7 @@ void castor::tape::utils::parseTpconfigFile(const char *const filename, ": filename='" << filename << "'" ": " << sstrerror(fgetsErrno); - throw(ex); + throw ex; } } @@ -602,7 +602,7 @@ void castor::tape::utils::extractTpconfigDriveNames( // statFile //------------------------------------------------------------------------------ void castor::tape::utils::statFile(const char *const filename, - struct stat &buf) throw(castor::exception::Exception) { + struct stat &buf) { const int rc = stat(filename, &buf); const int savedErrno = errno; @@ -616,7 +616,7 @@ void castor::tape::utils::statFile(const char *const filename, ": filename=" << filename << ": " << sstrerror(savedErrno); - throw(ex); + throw ex; } } @@ -628,7 +628,7 @@ void castor::tape::utils::pthreadCreate( const pthread_attr_t *const attr, void *(*const startRoutine)(void*), void *const arg) - throw(castor::exception::Exception) { + { const int rc = pthread_create(thread, attr, startRoutine, arg); @@ -639,7 +639,7 @@ void castor::tape::utils::pthreadCreate( "pthread_create() call failed" << ": " << sstrerror(rc); - throw(ex); + throw ex; } } @@ -647,7 +647,7 @@ void castor::tape::utils::pthreadCreate( // pthreadJoin //------------------------------------------------------------------------------ void castor::tape::utils::pthreadJoin(pthread_t thread, void **const valuePtr) - throw(castor::exception::Exception) { + { const int rc = pthread_join(thread, valuePtr); @@ -658,7 +658,7 @@ void castor::tape::utils::pthreadJoin(pthread_t thread, void **const valuePtr) "pthread_join() call failed" << ": " << sstrerror(rc); - throw(ex); + throw ex; } } @@ -667,7 +667,7 @@ void castor::tape::utils::pthreadJoin(pthread_t thread, void **const valuePtr) //------------------------------------------------------------------------------ const char *castor::tape::utils::getMandatoryValueFromConfiguration( const char *const category, const char *const name) - throw(castor::exception::InvalidConfiguration) { + { const char *const tmp = getconfent(category, name, 0); @@ -679,7 +679,7 @@ const char *castor::tape::utils::getMandatoryValueFromConfiguration( category << "/" << name << ": The parameter is not specified in castor.conf"; - throw(ex); + throw ex; } if(isAnEmptyString(tmp)) { @@ -690,7 +690,7 @@ const char *castor::tape::utils::getMandatoryValueFromConfiguration( category << "/" << name << ": The value of the parameter is an empty string"; - throw(ex); + throw ex; } return tmp; @@ -748,7 +748,7 @@ std::string castor::tape::utils::tapeBlockIdToString( // appendPathToEnvVar //--------------------------------------------------------------------------- void castor::tape::utils::appendPathToEnvVar(const std::string &envVarName, - const std::string &pathToBeAppended) throw(castor::exception::Exception) { + const std::string &pathToBeAppended) { // Get the current value of the enviornment variable (there may not be one) const char *const currentPath = getenv(envVarName.c_str()); diff --git a/castor/tape/utils/utils.hpp b/castor/tape/utils/utils.hpp index 794fc2744078ab8413a49416338ff6c256b5e9d4..65dd8f65908e82136f8d2789c126d7fea5940245 100644 --- a/castor/tape/utils/utils.hpp +++ b/castor/tape/utils/utils.hpp @@ -112,7 +112,7 @@ namespace utils { * @param len The length of the character buffer. */ void toHex(uint32_t number, char *buf, size_t len) - throw(castor::exception::InvalidArgument); + ; /** * Writes the hex form of the specified unsigned 32-bit integer into the @@ -123,7 +123,7 @@ void toHex(uint32_t number, char *buf, size_t len) * @param buf The character buffer that must have a minimum of 9 bytes. */ template<size_t n> void toHex(uint32_t number, char (&buf)[n]) - throw(castor::exception::InvalidArgument) { + { toHex(number, buf, n); } @@ -151,7 +151,7 @@ int countOccurrences(const char ch, const char *str); * @param dstLen The length of the destination character string. */ void toHex(const uint64_t i, char *dst, size_t dstLen) - throw(castor::exception::Exception); + ; /** * Writes the specified unsigned 64-bit integer into the specified @@ -164,7 +164,7 @@ void toHex(const uint64_t i, char *dst, size_t dstLen) * @param dst The destination character array. */ template<int n> void toHex(const uint64_t i, char (&dst)[n]) - throw(castor::exception::Exception) { + { toHex(i, dst, n); } @@ -237,7 +237,7 @@ const char *volumeModeToString(const tapegateway::VolumeMode mode) throw(); * * @param fd The file descriptor of the file to be drained. */ -ssize_t drainFile(const int fd) throw(castor::exception::Exception); +ssize_t drainFile(const int fd) ; /** * Appends each line of the specified file to the specified list of lines. @@ -251,7 +251,7 @@ ssize_t drainFile(const int fd) throw(castor::exception::Exception); * @param lines The list to which each line of the file will be appended. */ void readFileIntoList(const char *const filename, - std::list<std::string> &lines) throw(castor::exception::Exception); + std::list<std::string> &lines) ; /** * Appends to the specified list the filenames from the "filelist" file with @@ -269,7 +269,7 @@ void readFileIntoList(const char *const filename, * @param list The list to which the filenames will be appended. */ void parseFileList(const char *filename, std::list<std::string> &list) - throw(castor::exception::Exception); + ; /** * Creates and returns an std::string which is the result of the stripping @@ -319,7 +319,7 @@ unsigned short getPortFromConfig(const char *const category, * TPCONFIG file. */ void parseTpconfigFile(const char *const filename, TpconfigLines &lines) - throw(castor::exception::Exception); + ; /** * Extracts the drive-unit names from the specified list of parsed TPCONFIG @@ -347,7 +347,7 @@ void extractTpconfigDriveNames(const TpconfigLines &tpconfigLines, * specified file. */ void statFile(const char *const filename, struct stat &buf) - throw(castor::exception::Exception); + ; /** * C++ wrapper function of the C pthread_create() function. This wrapper @@ -368,7 +368,7 @@ void pthreadCreate( const pthread_attr_t *const attr, void *(*const startRoutine)(void*), void *const arg) - throw(castor::exception::Exception); + ; /** * C++ wrapper function of the C pthread_join() function. This wrapper @@ -380,7 +380,7 @@ void pthreadCreate( * value set by the target thread calling pthread_exit(). */ void pthreadJoin(pthread_t thread, void **const valuePtr) - throw(castor::exception::Exception); + ; /** * C++ wrapper function of the C getconfent() function. This wrapper @@ -392,7 +392,7 @@ void pthreadJoin(pthread_t thread, void **const valuePtr) * @return The value returned bu getconfent(). */ const char *getMandatoryValueFromConfiguration(const char *const category, - const char *const name) throw(castor::exception::InvalidConfiguration); + const char *const name) ; /** * Returns true if the specified C string is empty else returns false. @@ -431,7 +431,7 @@ std::string tapeBlockIdToString( * environment variable. */ void appendPathToEnvVar(const std::string &envVarName, - const std::string &pathToBeAppended) throw(castor::exception::Exception); + const std::string &pathToBeAppended) ; } // namespace utils } // namespace tape diff --git a/castor/utils/SmartArrayPtr.hpp b/castor/utils/SmartArrayPtr.hpp index 4c8e8c725bfc3660d09a3a52ddfd0675b5fd9094..be631a678af89f5df02dd019af04b302d4a295f7 100644 --- a/castor/utils/SmartArrayPtr.hpp +++ b/castor/utils/SmartArrayPtr.hpp @@ -89,7 +89,7 @@ public: * </ul> */ SmartArrayPtr &operator=(SmartArrayPtr& obj) - throw(castor::exception::NotAnOwner) { + { reset(obj.release()); return *this; } @@ -117,7 +117,7 @@ public: * * @return The released pointer. */ - T *release() throw(castor::exception::NotAnOwner) { + T *release() { // If this smart pointer does not own a pointer if(NULL == m_arrayPtr) { castor::exception::NotAnOwner ex; diff --git a/castor/utils/SmartFILEPtr.cpp b/castor/utils/SmartFILEPtr.cpp index 412bc48bd32cfe65d784777e4888e2fa09052f82..a8ea8897b682f8312a263658ff004ed2ffe74c7a 100644 --- a/castor/utils/SmartFILEPtr.cpp +++ b/castor/utils/SmartFILEPtr.cpp @@ -65,7 +65,7 @@ void castor::utils::SmartFILEPtr::reset(FILE *const file = NULL) //----------------------------------------------------------------------------- castor::utils::SmartFILEPtr &castor::utils::SmartFILEPtr::operator=(SmartFILEPtr& obj) - throw(castor::exception::NotAnOwner) { + { reset(obj.release()); return *this; } @@ -88,12 +88,12 @@ FILE *castor::utils::SmartFILEPtr::get() const throw() { // release //----------------------------------------------------------------------------- FILE *castor::utils::SmartFILEPtr::release() - throw(castor::exception::NotAnOwner) { + { // If this smart pointer does not own a pointer if(m_file == NULL) { castor::exception::NotAnOwner ex; ex.getMessage() << "Smart pointer does not own a FILE pointer"; - throw(ex); + throw ex; } FILE *const tmp = m_file; diff --git a/castor/utils/SmartFILEPtr.hpp b/castor/utils/SmartFILEPtr.hpp index 0be5f448fe45b138b088cc6607fe40601a0b1df7..cc66f2011a0e59ba8b5424d6764fa4bae23042d2 100644 --- a/castor/utils/SmartFILEPtr.hpp +++ b/castor/utils/SmartFILEPtr.hpp @@ -75,7 +75,7 @@ public: * </ul> */ SmartFILEPtr &operator=(SmartFILEPtr& obj) - throw(castor::exception::NotAnOwner); + ; /** * Destructor. @@ -96,7 +96,7 @@ public: * * @return The released FILE pointer. */ - FILE *release() throw(castor::exception::NotAnOwner); + FILE *release() ; private: diff --git a/castor/utils/SmartFd.cpp b/castor/utils/SmartFd.cpp index 7556c353eeea5448f826a11cf1b987cae40aa37a..e66ee921b46bb2f593f0cdce62739e5679e85d9c 100644 --- a/castor/utils/SmartFd.cpp +++ b/castor/utils/SmartFd.cpp @@ -80,7 +80,7 @@ void castor::utils::SmartFd::reset(const int fd = -1) throw() { // SmartFd assignment operator //----------------------------------------------------------------------------- castor::utils::SmartFd &castor::utils::SmartFd::operator=(SmartFd& obj) - throw(castor::exception::NotAnOwner) { + { reset(obj.release()); return *this; } @@ -102,12 +102,12 @@ int castor::utils::SmartFd::get() const throw() { //----------------------------------------------------------------------------- // release //----------------------------------------------------------------------------- -int castor::utils::SmartFd::release() throw(castor::exception::NotAnOwner) { +int castor::utils::SmartFd::release() { // If this SmartFd does not own a file descriptor if(m_fd < 0) { castor::exception::NotAnOwner ex; ex.getMessage() << "Smart file-descriptor does not own a file-descriptor"; - throw(ex); + throw ex; } const int tmpFd = m_fd; diff --git a/castor/utils/SmartFd.hpp b/castor/utils/SmartFd.hpp index 65032e295b032a6fb89292467c11681be00d59b9..b3f8ed03f6a1bee1d6a3a575cf18fc8eaf20cfb3 100644 --- a/castor/utils/SmartFd.hpp +++ b/castor/utils/SmartFd.hpp @@ -103,7 +103,7 @@ public: * the previous owner (obj). * </ul> */ - SmartFd &operator=(SmartFd& obj) throw(castor::exception::NotAnOwner); + SmartFd &operator=(SmartFd& obj) ; /** * Destructor. @@ -125,7 +125,7 @@ public: * * @return The released file descriptor. */ - int release() throw(castor::exception::NotAnOwner); + int release() ; private: diff --git a/castor/utils/utils.cpp b/castor/utils/utils.cpp index b73063d28a09b27c7643f55689c646257303352f..6d7173d65f241a4b6b0b734b53a618f33ee8ccde 100644 --- a/castor/utils/utils.cpp +++ b/castor/utils/utils.cpp @@ -151,7 +151,7 @@ void castor::utils::toUpper(std::string &str) { // getTimeOfDay //--------------------------------------------------------------------------- void castor::utils::getTimeOfDay(struct timeval *const tv, - struct timezone *const tz) throw(castor::exception::Exception) { + struct timezone *const tz) { if(0 != gettimeofday(tv, tz)) { const int savedErrno = errno; char errBuf[100]; @@ -222,7 +222,7 @@ double castor::utils::timevalToDouble(const timeval &tv) throw() { // copyString //----------------------------------------------------------------------------- void castor::utils::copyString(char *const dst, const size_t dstSize, - const char *const src) throw(castor::exception::Exception) { + const char *const src) { if(dst == NULL) { castor::exception::Exception ex(EINVAL); @@ -274,7 +274,7 @@ void castor::utils::copyString(char *const dst, const size_t dstSize, // @param maxSize The maximum length the identifier string is permitted to have. //------------------------------------------------------------------------------ static void checkDgnVidSyntax(const char *const idTypeName, const char *id, - const size_t maxLen) throw(castor::exception::InvalidArgument) { + const size_t maxLen) { // Check the length of the identifier string const size_t len = strlen(id); @@ -306,7 +306,7 @@ static void checkDgnVidSyntax(const char *const idTypeName, const char *id, // checkDgnSyntax //------------------------------------------------------------------------------ void castor::utils::checkDgnSyntax(const char *dgn) - throw(castor::exception::InvalidArgument) { + { checkDgnVidSyntax("DGN", dgn, CA_MAXDGNLEN); } @@ -314,6 +314,6 @@ void castor::utils::checkDgnSyntax(const char *dgn) // checkVidSyntax //------------------------------------------------------------------------------ void castor::utils::checkVidSyntax(const char *vid) - throw(castor::exception::InvalidArgument) { + { checkDgnVidSyntax("VID", vid, CA_MAXVIDLEN); } diff --git a/castor/utils/utils.hpp b/castor/utils/utils.hpp index 5505f7aed9acab4c78a691647c654b4c5710870f..7312b564d8bcc07043380413e6631a03eea6d5b7 100644 --- a/castor/utils/utils.hpp +++ b/castor/utils/utils.hpp @@ -101,7 +101,7 @@ void toUpper(std::string &str); * @param tz See the manual page for gettimeofday. */ void getTimeOfDay(struct timeval *const tv, struct timezone *const tz) - throw(castor::exception::Exception); + ; /** * Compares two time-values, a and b, and returns true if time value a is @@ -141,7 +141,7 @@ double timevalToDouble(const timeval &tv) throw(); * destination. */ void copyString(char *const dst, const size_t dstSize, const char *const src) - throw(castor::exception::Exception); + ; /** * Safely copies source string into destination string. The destination @@ -152,7 +152,7 @@ void copyString(char *const dst, const size_t dstSize, const char *const src) */ template<size_t dstSize> void copyString(char (&dst)[dstSize], const char *const src) - throw(castor::exception::Exception) { + { copyString(dst, dstSize, src); } @@ -173,7 +173,7 @@ template<typename T> void setBytes(T &object, const int c) throw() { * @param dgn The DGN to be checked. */ void checkDgnSyntax(const char *dgn) - throw(castor::exception::InvalidArgument); + ; /** * Throws an InvalidArgument exception if the specified VID is syntactically @@ -182,7 +182,7 @@ void checkDgnSyntax(const char *dgn) * @param vid The VID to be checked. */ void checkVidSyntax(const char *vid) - throw(castor::exception::InvalidArgument); + ; } // namespace utils } // namespace castor diff --git a/castor/vdqm/DatabaseHelper.cpp b/castor/vdqm/DatabaseHelper.cpp index 612808a0aed269f4029afd351b63a95a5f3458b9..ce0b96b45cd2027d8c9b534920d84db5d28cb86b 100644 --- a/castor/vdqm/DatabaseHelper.cpp +++ b/castor/vdqm/DatabaseHelper.cpp @@ -51,7 +51,7 @@ castor::vdqm::DatabaseHelper::DatabaseHelper() { //------------------------------------------------------------------------------ void castor::vdqm::DatabaseHelper::storeRepresentation( castor::IObject *const fr, Cuuid_t) - throw (castor::exception::Exception) { + { castor::Services* svcs = castor::BaseObject::services(); castor::BaseAddress ad; // Stores it into the data base @@ -139,7 +139,7 @@ void castor::vdqm::DatabaseHelper::storeRepresentation( // remove //------------------------------------------------------------------------------ void castor::vdqm::DatabaseHelper::deleteRepresentation -(castor::IObject* fr, Cuuid_t) throw (castor::exception::Exception) { +(castor::IObject* fr, Cuuid_t) { castor::Services *svcs = castor::BaseObject::services(); castor::BaseAddress ad; // Deletes it from the data base @@ -169,7 +169,7 @@ void castor::vdqm::DatabaseHelper::deleteRepresentation // update //------------------------------------------------------------------------------ void castor::vdqm::DatabaseHelper::updateRepresentation -(castor::IObject* fr, Cuuid_t) throw (castor::exception::Exception) { +(castor::IObject* fr, Cuuid_t) { castor::Services *svcs = castor::BaseObject::services(); castor::BaseAddress ad; // Stores it into the data base diff --git a/castor/vdqm/DatabaseHelper.hpp b/castor/vdqm/DatabaseHelper.hpp index 7babb0e56cde31c3bf0017eb9bb5357127cb7bc1..b8352bd448ea40476aa70746a52cc50cc58a4120 100644 --- a/castor/vdqm/DatabaseHelper.hpp +++ b/castor/vdqm/DatabaseHelper.hpp @@ -56,7 +56,7 @@ namespace castor { * @param cuuid its uuid (for logging purposes only) */ static void storeRepresentation(castor::IObject *const fr, Cuuid_t cuuid) - throw (castor::exception::Exception); + ; /** * Deletes the IObject in the data base. Please edit this function and @@ -66,7 +66,7 @@ namespace castor { * @param cuuid its uuid (for logging purposes only) */ static void deleteRepresentation(castor::IObject* fr, Cuuid_t cuuid) - throw (castor::exception::Exception); + ; /** * Updates the IObject representation in the data base. Please edit this @@ -76,7 +76,7 @@ namespace castor { * @param cuuid its uuid (for logging purposes only) */ static void updateRepresentation(castor::IObject* fr, Cuuid_t cuuid) - throw (castor::exception::Exception); + ; private: diff --git a/castor/vdqm/DevTools.cpp b/castor/vdqm/DevTools.cpp index 0333e33b2226581a00ede7c8aa4f241095c890c2..3eb63cffd33dc4bab89722da8b34cf390235e3dd 100644 --- a/castor/vdqm/DevTools.cpp +++ b/castor/vdqm/DevTools.cpp @@ -82,7 +82,7 @@ void castor::vdqm::DevTools::printSocketDescription(std::ostream &os, //------------------------------------------------------------------------------ void castor::vdqm::DevTools::printMessage(std::ostream &os, const bool messageWasSent, const bool messageInNetworkByteOrder, - const int socket, void* hdrbuf) throw (castor::exception::Exception) + const int socket, void* hdrbuf) { uint32_t magic = 0; uint32_t reqtype = 0; diff --git a/castor/vdqm/DevTools.hpp b/castor/vdqm/DevTools.hpp index 1badd2d28bd801fbfa23b581389b14ef3e6ddf59..684be5b49c19e95f690725a348c3cbb845e9a5a2 100644 --- a/castor/vdqm/DevTools.hpp +++ b/castor/vdqm/DevTools.hpp @@ -85,7 +85,7 @@ namespace castor { */ static void printMessage(std::ostream &os, const bool messageWasSent, const bool messageInNetworkByteOrder, const int socket, void* hdrbuf) - throw (castor::exception::Exception); + ; /** * Prints the string form of the specified tape drive status bitset using diff --git a/castor/vdqm/DriveSchedulerThread.cpp b/castor/vdqm/DriveSchedulerThread.cpp index 6318af826a71383f37e20bc7ef60ad67c38acc7a..0f2c09e2025ac7d3720d34271161350fa1edafea 100644 --- a/castor/vdqm/DriveSchedulerThread.cpp +++ b/castor/vdqm/DriveSchedulerThread.cpp @@ -152,7 +152,7 @@ void castor::vdqm::DriveSchedulerThread::run(void*) { // getDbVdqmSvc //----------------------------------------------------------------------------- castor::vdqm::IVdqmSvc *castor::vdqm::DriveSchedulerThread::getDbVdqmSvc() - throw(castor::exception::Exception) + { castor::Services *svcs = castor::BaseObject::services(); castor::IService *svc = svcs->service("DbVdqmSvc", castor::SVC_DBVDQMSVC); diff --git a/castor/vdqm/DriveSchedulerThread.hpp b/castor/vdqm/DriveSchedulerThread.hpp index 71c953bcffc16248cffa65da2444713ea4ccc0e1..442fef8029dca9187a25141f7fb49be6a17c056b 100644 --- a/castor/vdqm/DriveSchedulerThread.hpp +++ b/castor/vdqm/DriveSchedulerThread.hpp @@ -78,7 +78,7 @@ namespace castor { * non-zero pointer or it throws an exception. */ castor::vdqm::IVdqmSvc *getDbVdqmSvc() - throw(castor::exception::Exception); + ; }; // class DriveSchedulerThread diff --git a/castor/vdqm/IVdqmSvc.hpp b/castor/vdqm/IVdqmSvc.hpp index 08cd9ea93817a52e82a884dd5ea661a581cbbfa0..30500929bd1ce87fdc88348eaeb7a6cb362950d1 100644 --- a/castor/vdqm/IVdqmSvc.hpp +++ b/castor/vdqm/IVdqmSvc.hpp @@ -96,7 +96,7 @@ namespace castor { */ virtual TapeServer* selectOrCreateTapeServer( const std::string serverName, bool withTapeDrive) - throw (castor::exception::Exception) = 0; + = 0; /** * Checks, if there is already an entry for that tapeRequest. The entry @@ -105,7 +105,7 @@ namespace castor { * @return true, if the request does not exist. */ virtual bool checkTapeRequest(const TapeRequest *const newTapeRequest) - throw (castor::exception::Exception) = 0; + = 0; /** * Returns the queue position of the tape request. @@ -113,7 +113,7 @@ namespace castor { * @return The row number or -1 if there is no entry for it. */ virtual int getQueuePosition(const u_signed64 tapeRequestId) - throw (castor::exception::Exception) = 0; + = 0; /** * Sets the priority of a volume. @@ -133,7 +133,7 @@ namespace castor { virtual void setVolPriority(const int priority, const int clientUID, const int clientGID, const std::string clientHost, const std::string vid, const int tpMode, const int lifespanType) - throw (castor::exception::Exception) = 0; + = 0; /** * Deletes the specified volume priority if it exists, else does @@ -152,7 +152,7 @@ namespace castor { const int tpMode, const int lifespanType, int *const priority, int *const clientUID, int *const clientGID, std::string *const clientHost) - throw (castor::exception::Exception) = 0; + = 0; /** * Deletes volume priorities older than the specfied age. @@ -162,7 +162,7 @@ namespace castor { * @return the number of volume priorities deleted. */ virtual unsigned int deleteOldVolPriorities(const unsigned int maxAge) - throw (castor::exception::Exception) = 0; + = 0; /** * Inner class used to return the result of listVolPriorities. @@ -188,7 +188,7 @@ namespace castor { * Note that the returned list should be deallocated by the caller. */ virtual void getAllVolPriorities(std::list<VolPriority> &priorities) - throw (castor::exception::Exception) = 0; + = 0; /** * Gets the list of effective volume priorities. @@ -199,7 +199,7 @@ namespace castor { */ virtual void getEffectiveVolPriorities( std::list<VolPriority> &priorities) - throw (castor::exception::Exception) = 0; + = 0; /** * Gets the list of volume priorities with the specified lifespan type. @@ -211,7 +211,7 @@ namespace castor { * Note that the returned list should be deallocated by the caller. */ virtual void getVolPriorities(std::list<VolPriority> &priorities, - const int lifespanType) throw (castor::exception::Exception) = 0; + const int lifespanType) = 0; /** * Inner class used together with VolRequestList to return the result @@ -270,7 +270,7 @@ namespace castor { */ virtual void getVolRequestsPriorityOrder(VolRequestList &requests, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception) = 0; + = 0; /** * Tries to allocate in the database a free tape drive to a pending @@ -301,7 +301,7 @@ namespace castor { virtual int allocateDrive(u_signed64 *tapeDriveId, std::string *tapeDriveName, u_signed64 *tapeRequestId, std::string *tapeRequestVid) - throw (castor::exception::Exception) = 0; + = 0; /** * Tries to re-use a drive allocation. @@ -329,14 +329,14 @@ namespace castor { virtual int reuseDriveAllocation(castor::vdqm::VdqmTape *const tape, castor::vdqm::TapeDrive *const drive, const int accessMode, u_signed64 *const tapeRequestId) - throw (castor::exception::Exception) = 0; + = 0; /** * Returns a matched "tape drive / tape request" pair if one exists, * else NULL. */ virtual castor::vdqm::TapeRequest *requestToSubmit() - throw (castor::exception::Exception) = 0; + = 0; /** * Looks, whether the specific tape access exist in the db. If not the @@ -352,7 +352,7 @@ namespace castor { const int accessMode, const std::string density, const std::string tapeModel) - throw (castor::exception::Exception) = 0; + = 0; /** * Looks, if the specified dgName exists in the database. @@ -364,7 +364,7 @@ namespace castor { */ virtual DeviceGroupName* selectDeviceGroupName( const std::string dgName) - throw (castor::exception::Exception) = 0; + = 0; /** * Inner class used to help manage the allocated memory associated with @@ -403,7 +403,7 @@ namespace castor { */ virtual void getTapeRequestQueue(VolReqMsgList &requests, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception) = 0; + = 0; /** * Gets the tape drives queue with the specified dgn and server. @@ -422,7 +422,7 @@ namespace castor { */ virtual void getTapeDriveQueue(std::list<vdqmDrvReq_t> &drvReqs, const std::string dgn, const std::string requestedSrv) - throw (castor::exception::Exception) = 0; + = 0; /** * Manages the casting of VolReqID, to find also tape requests, which @@ -432,7 +432,7 @@ namespace castor { * @return The tape request and its ClientIdentification, or NULL */ virtual TapeRequest* selectTapeRequest(const int volReqID) - throw (castor::exception::Exception) = 0; + = 0; /** * Selects the tape request with the specified id for update. @@ -441,7 +441,7 @@ namespace castor { * @return true if tape request exists, else false. */ virtual bool selectTapeRequestForUpdate(const int volReqID) - throw (castor::exception::Exception) = 0; + = 0; /** * Retrieves a tapeDrive from the database based on its struct @@ -459,7 +459,7 @@ namespace castor { virtual TapeDrive* selectTapeDrive( const vdqmDrvReq_t* driveRequest, TapeServer* tapeServer) - throw (castor::exception::Exception) = 0; + = 0; /** * Inserts the specified dedications for the specified drive into the @@ -472,7 +472,7 @@ namespace castor { */ virtual void dedicateDrive(const std::string driveName, const std::string serverName, const std::string dgName, - const std::string dedicate) throw (castor::exception::Exception) = 0; + const std::string dedicate) = 0; /** * Deletes the specified drive from the database; @@ -482,7 +482,7 @@ namespace castor { * @dgName device group name */ virtual void deleteDrive(std::string driveName, std::string serverName, - std::string dgName) throw (castor::exception::Exception) = 0; + std::string dgName) = 0; /** * Retrieves a tape from the database based on its vid. If no tape is @@ -499,7 +499,7 @@ namespace castor { * several tapes found, DB problem, etc...) */ virtual castor::vdqm::VdqmTape* selectOrCreateTape( - const std::string vid) throw (castor::exception::Exception) = 0; + const std::string vid) = 0; /** * Check whether another request is currently @@ -515,7 +515,7 @@ namespace castor { */ virtual bool existTapeDriveWithTapeInUse( const std::string volid) - throw (castor::exception::Exception) = 0; + = 0; /** * Check whether the tape, specified by the vid is mounted @@ -528,7 +528,7 @@ namespace castor { */ virtual bool existTapeDriveWithTapeMounted( const std::string volid) - throw (castor::exception::Exception) = 0; + = 0; /** * Returns the tape with this vid @@ -540,7 +540,7 @@ namespace castor { */ virtual castor::vdqm::VdqmTape* selectTapeByVid( const std::string vid) - throw (castor::exception::Exception) = 0; + = 0; /** * Looks through the tape requests, whether there is one for the @@ -553,7 +553,7 @@ namespace castor { */ virtual TapeRequest* selectTapeReqForMountedTape( const TapeDrive* tapeDrive) - throw (castor::exception::Exception) = 0; + = 0; /** * Selects from the TapeDriveCompatibility table all entries for the @@ -564,7 +564,7 @@ namespace castor { */ virtual void selectCompatibilitiesForDriveModel( TapeDrive *const tapeDrive, const std::string tapeDriveModel) - throw (castor::exception::Exception) = 0; + = 0; /** * Selects from the TapeAccessSpecification table all entries for the @@ -578,7 +578,7 @@ namespace castor { */ virtual std::vector<TapeAccessSpecification*>* selectTapeAccessSpecifications(const std::string tapeModel) - throw (castor::exception::Exception) = 0; + = 0; /** * Tries to move a the state of the specified request from @@ -637,7 +637,7 @@ namespace castor { int &requestStatusAfter, u_signed64 &requestDriveIdBefore, u_signed64 &requestDriveIdAfter) - throw (castor::exception::Exception) = 0; + = 0; /** * Resets the specified drive and request. @@ -692,7 +692,7 @@ namespace castor { int &requestStatusAfter, u_signed64 &requestDriveIdBefore, u_signed64 &requestDriveIdAfter) - throw (castor::exception::Exception) = 0; + = 0; }; // end of class IVdqmSvc diff --git a/castor/vdqm/OldProtocolInterpreter.cpp b/castor/vdqm/OldProtocolInterpreter.cpp index 4fa1852b2f643622e8ec4404b999feffb8900420..64fd684466d5a6353301b0e7c513d44cef7fc8a9 100644 --- a/castor/vdqm/OldProtocolInterpreter.cpp +++ b/castor/vdqm/OldProtocolInterpreter.cpp @@ -52,7 +52,7 @@ //------------------------------------------------------------------------------ castor::vdqm::OldProtocolInterpreter::OldProtocolInterpreter( castor::io::ServerSocket &socket, const Cuuid_t &cuuid) - throw(castor::exception::Exception) : m_socket(socket), m_cuuid(cuuid){ + : m_socket(socket), m_cuuid(cuuid){ } @@ -69,7 +69,7 @@ throw() { //------------------------------------------------------------------------------ int castor::vdqm::OldProtocolInterpreter::readProtocol(vdqmHdr_t *header, vdqmVolReq_t *volumeRequest, vdqmDrvReq_t *driveRequest) -throw (castor::exception::Exception) { + { // Header buffer is shorter, because the magic number should already be read // out @@ -294,7 +294,7 @@ throw (castor::exception::Exception) { //------------------------------------------------------------------------------ int castor::vdqm::OldProtocolInterpreter::sendToOldClient(vdqmHdr_t *header, vdqmVolReq_t *volumeRequest, vdqmDrvReq_t *driveRequest) -throw (castor::exception::Exception) { + { char hdrbuf[VDQM_HDRBUFSIZ]; char buf[VDQM_MSGBUFSIZ]; @@ -442,7 +442,7 @@ throw (castor::exception::Exception) { // sendAcknCommit //------------------------------------------------------------------------------ void castor::vdqm::OldProtocolInterpreter::sendAcknCommit() -throw (castor::exception::Exception) { + { char hdrbuf[VDQM_HDRBUFSIZ]; int recvreqtype, len; @@ -480,7 +480,7 @@ throw (castor::exception::Exception) { // recvAcknFromOldClient //------------------------------------------------------------------------------ int castor::vdqm::OldProtocolInterpreter::recvAcknFromOldClient() -throw (castor::exception::Exception) { + { char hdrbuf[VDQM_HDRBUFSIZ]; unsigned int magic, recvreqtype, len; @@ -514,7 +514,7 @@ throw (castor::exception::Exception) { // sendAcknPing //------------------------------------------------------------------------------ void castor::vdqm::OldProtocolInterpreter::sendAcknPing(int queuePosition) -throw (castor::exception::Exception) { + { int magic = VDQM_MAGIC; int reqtype = VDQM_PING; @@ -546,7 +546,7 @@ throw (castor::exception::Exception) { // sendAcknRollback //------------------------------------------------------------------------------ void castor::vdqm::OldProtocolInterpreter::sendAcknRollback(int errorCode) -throw (castor::exception::Exception) { + { char hdrbuf[VDQM_HDRBUFSIZ]; int magic, recvreqtype, len; diff --git a/castor/vdqm/OldProtocolInterpreter.hpp b/castor/vdqm/OldProtocolInterpreter.hpp index eefb55162686284bef94b163d516f5e91d47383d..7353ee42a430c86e491217d18fcdb373f577e21e 100644 --- a/castor/vdqm/OldProtocolInterpreter.hpp +++ b/castor/vdqm/OldProtocolInterpreter.hpp @@ -56,7 +56,7 @@ namespace castor { * @exception In case that one of the parameters is NULL */ OldProtocolInterpreter(castor::io::ServerSocket &socket, - const Cuuid_t &cuuid) throw (castor::exception::Exception); + const Cuuid_t &cuuid) ; /** * Destructor @@ -78,7 +78,7 @@ namespace castor { */ int readProtocol(vdqmHdr_t *header, vdqmVolReq_t *volumeRequest, vdqmDrvReq_t *driveRequest) - throw (castor::exception::Exception); + ; /** * Sends the request back to the client with its corresponding ID. @@ -88,7 +88,7 @@ namespace castor { */ int sendToOldClient(vdqmHdr_t *header, vdqmVolReq_t *volumeRequest, vdqmDrvReq_t *driveRequest) - throw (castor::exception::Exception); + ; /** * Sends a VDQM_COMMIT back to the client. @@ -96,7 +96,7 @@ namespace castor { * @exception In case of error */ void sendAcknCommit() - throw (castor::exception::Exception); + ; /** * Waits for an acknowledgement of the old tape daemon, that the @@ -106,7 +106,7 @@ namespace castor { * @exception In case of error */ int recvAcknFromOldClient() - throw (castor::exception::Exception); + ; /** * Sends a commit for a ping request back to the client and informes about @@ -116,7 +116,7 @@ namespace castor { * @exception In case of error */ void sendAcknPing(int queuePosition) - throw (castor::exception::Exception); + ; /** * This funtion is used in case of errors to send back the error code @@ -127,7 +127,7 @@ namespace castor { * @exception In case of error */ void sendAcknRollback(int errorCode) - throw (castor::exception::Exception); + ; private: diff --git a/castor/vdqm/OldRequestFacade.cpp b/castor/vdqm/OldRequestFacade.cpp index c40f62d651399125c297894cf272e4f5391f8b4e..45e620cf22fa26de7a8c2dbaa77df4ea546c3a76 100644 --- a/castor/vdqm/OldRequestFacade.cpp +++ b/castor/vdqm/OldRequestFacade.cpp @@ -67,7 +67,7 @@ castor::vdqm::OldRequestFacade::~OldRequestFacade() throw() { // checkRequestType //------------------------------------------------------------------------------ void castor::vdqm::OldRequestFacade::checkRequestType(const Cuuid_t cuuid) - throw (castor::exception::Exception) { + { int i; int req_values[] = VDQM_REQ_VALUES; @@ -104,7 +104,7 @@ void castor::vdqm::OldRequestFacade::checkRequestType(const Cuuid_t cuuid) //------------------------------------------------------------------------------ bool castor::vdqm::OldRequestFacade::handleRequestType( OldProtocolInterpreter* oldProtInterpreter, const Cuuid_t cuuid) - throw (castor::exception::Exception) { + { bool handleRequest = true; diff --git a/castor/vdqm/OldRequestFacade.hpp b/castor/vdqm/OldRequestFacade.hpp index e1c46983552926a523665f517ac89244b5627f15..1a46e5a5b37f2da5e05aa902d33c7a134efd70cf 100644 --- a/castor/vdqm/OldRequestFacade.hpp +++ b/castor/vdqm/OldRequestFacade.hpp @@ -72,7 +72,7 @@ namespace castor { * @return true, if there were no complications */ bool handleRequestType(OldProtocolInterpreter* oldProtInterpreter, - const Cuuid_t cuuid) throw (castor::exception::Exception); + const Cuuid_t cuuid) ; /** * Throws an exception if the request type is invalid. @@ -80,12 +80,12 @@ namespace castor { * @param cuuid The unique id of the request. Needed for dlf. */ void checkRequestType(const Cuuid_t cuuid) - throw (castor::exception::Exception); + ; /** * Destructor. */ - ~OldRequestFacade() throw (); + ~OldRequestFacade() throw(); private: diff --git a/castor/vdqm/ProtocolFacade.cpp b/castor/vdqm/ProtocolFacade.cpp index 93c490e89430461cdc6a118dd7752c3e4a72fc7b..c76d05cd0e920209cb4a8f6495bfa63557ea2711 100644 --- a/castor/vdqm/ProtocolFacade.cpp +++ b/castor/vdqm/ProtocolFacade.cpp @@ -51,7 +51,7 @@ // constructor //------------------------------------------------------------------------------ castor::vdqm::ProtocolFacade::ProtocolFacade(castor::io::ServerSocket &socket, - const Cuuid_t &cuuid) throw(castor::exception::Exception) : + const Cuuid_t &cuuid) : m_socket(socket), m_cuuid(cuuid) { } @@ -68,7 +68,7 @@ castor::vdqm::ProtocolFacade::~ProtocolFacade() // handleProtocolVersion //------------------------------------------------------------------------------ void castor::vdqm::ProtocolFacade::handleProtocolVersion() - throw (castor::exception::Exception) { + { //The magic Number of the message on the socket unsigned int magicNumber = 0; @@ -162,7 +162,7 @@ void castor::vdqm::ProtocolFacade::handleProtocolVersion() // handleOldVdqmRequest //------------------------------------------------------------------------------ void castor::vdqm::ProtocolFacade::handleOldVdqmRequest( - const unsigned int magicNumber) throw (castor::exception::Exception) { + const unsigned int magicNumber) { // Message of the old Protocol vdqmVolReq_t volumeRequest; @@ -338,7 +338,7 @@ void castor::vdqm::ProtocolFacade::handleOldVdqmRequest( // handleVdqmMagic2Request //------------------------------------------------------------------------------ void castor::vdqm::ProtocolFacade::handleVdqmMagic2Request( - const unsigned int magicNumber) throw (castor::exception::Exception) { + const unsigned int magicNumber) { vdqmHdr_t header; @@ -454,7 +454,7 @@ void castor::vdqm::ProtocolFacade::handleVdqmMagic2Request( // handleVdqmMagic3Request //------------------------------------------------------------------------------ void castor::vdqm::ProtocolFacade::handleVdqmMagic3Request( - const unsigned int magicNumber) throw (castor::exception::Exception) { + const unsigned int magicNumber) { vdqmHdr_t header; @@ -577,7 +577,7 @@ void castor::vdqm::ProtocolFacade::handleVdqmMagic3Request( // handleVdqmMagic4Request //------------------------------------------------------------------------------ void castor::vdqm::ProtocolFacade::handleVdqmMagic4Request( - const unsigned int magicNumber) throw (castor::exception::Exception) { + const unsigned int magicNumber) { vdqmHdr_t header; vdqmVolReq_t volReq; diff --git a/castor/vdqm/ProtocolFacade.hpp b/castor/vdqm/ProtocolFacade.hpp index eb575b03e21b073402b7715dd0fe97abf571dfb6..a1a22ec97ebdd0057bcd6978f5f2783a755121c2 100644 --- a/castor/vdqm/ProtocolFacade.hpp +++ b/castor/vdqm/ProtocolFacade.hpp @@ -52,7 +52,7 @@ namespace castor { * @exception In case that one of the parameter is NULL */ ProtocolFacade(castor::io::ServerSocket &socket, const Cuuid_t &cuuid) - throw (castor::exception::Exception); + ; /** * Destructor @@ -67,7 +67,7 @@ namespace castor { * @exception Throws an exception in case of errors */ void handleProtocolVersion() - throw (castor::exception::Exception); + ; private: @@ -105,7 +105,7 @@ namespace castor { * to complete the message header. */ void handleOldVdqmRequest(const unsigned int magicNumber) - throw (castor::exception::Exception); + ; /** * Handles a VDQM message with a magic number of VDQM_MAGIC2. @@ -136,7 +136,7 @@ namespace castor { * to complete the message header. */ void handleVdqmMagic2Request(const unsigned int magicNumber) - throw (castor::exception::Exception); + ; /** * Handles a VDQM message with a magic number of VDQM_MAGIC3. @@ -167,7 +167,7 @@ namespace castor { * to complete the message header. */ void handleVdqmMagic3Request(const unsigned int magicNumber) - throw (castor::exception::Exception); + ; /** * Handles a VDQM message with a magic number of VDQM_MAGIC4. @@ -200,7 +200,7 @@ namespace castor { * to complete the message header. */ void handleVdqmMagic4Request(const unsigned int magicNumber) - throw (castor::exception::Exception); + ; /** * The object which includes the socket connection to the client diff --git a/castor/vdqm/RTCPJobSubmitterThread.cpp b/castor/vdqm/RTCPJobSubmitterThread.cpp index 3aa6388f128ca42013dfb59e7b4f2718c3327708..077d4cdc64cdde76bfba5755a1efab392994c7e9 100644 --- a/castor/vdqm/RTCPJobSubmitterThread.cpp +++ b/castor/vdqm/RTCPJobSubmitterThread.cpp @@ -49,7 +49,7 @@ // constructor //----------------------------------------------------------------------------- castor::vdqm::RTCPJobSubmitterThread::RTCPJobSubmitterThread() - throw () { + throw() { } @@ -57,7 +57,7 @@ castor::vdqm::RTCPJobSubmitterThread::RTCPJobSubmitterThread() // destructor //----------------------------------------------------------------------------- castor::vdqm::RTCPJobSubmitterThread::~RTCPJobSubmitterThread() - throw () { + throw() { } @@ -370,7 +370,7 @@ void castor::vdqm::RTCPJobSubmitterThread::process(castor::IObject *param) // getDbVdqmSvc //----------------------------------------------------------------------------- castor::vdqm::IVdqmSvc *castor::vdqm::RTCPJobSubmitterThread::getDbVdqmSvc() - throw(castor::exception::Exception) + { castor::Services *svcs = castor::BaseObject::services(); castor::IService *svc = svcs->service("DbVdqmSvc", castor::SVC_DBVDQMSVC); @@ -393,7 +393,7 @@ castor::vdqm::IVdqmSvc *castor::vdqm::RTCPJobSubmitterThread::getDbVdqmSvc() //----------------------------------------------------------------------------- void castor::vdqm::RTCPJobSubmitterThread::submitJob(const Cuuid_t &cuuid, castor::vdqm::TapeRequest *request) - throw(castor::exception::Exception) { + { castor::vdqm::ClientIdentification *client = request->client(); castor::vdqm::TapeDrive *tapeDrive = request->tapeDrive(); castor::vdqm::DeviceGroupName *dgn = tapeDrive->deviceGroupName(); diff --git a/castor/vdqm/RTCPJobSubmitterThread.hpp b/castor/vdqm/RTCPJobSubmitterThread.hpp index cfa9f3f51163e52a132178a405cfcc23be89dc20..30ee9cc6390e7dbbba9bdef50589510c2735b335 100644 --- a/castor/vdqm/RTCPJobSubmitterThread.hpp +++ b/castor/vdqm/RTCPJobSubmitterThread.hpp @@ -121,7 +121,7 @@ namespace castor { * @param request the tape request */ void submitJob(const Cuuid_t &cuuid, castor::vdqm::TapeRequest *request) - throw(castor::exception::Exception); + ; /** * Returns a pointer to the DbVdqmSvc or throws an exception if it cannot. @@ -130,7 +130,7 @@ namespace castor { * non-zero pointer or it throws an exception. */ castor::vdqm::IVdqmSvc *getDbVdqmSvc() - throw(castor::exception::Exception); + ; }; // class RTCPJobSubmitterThread diff --git a/castor/vdqm/RemoteCopyConnection.cpp b/castor/vdqm/RemoteCopyConnection.cpp index 43f93c03ae7e1b34de1350f1798e4caa210db63b..e30c43294ce773922bb2b31cbe26d1b990e4678f 100644 --- a/castor/vdqm/RemoteCopyConnection.cpp +++ b/castor/vdqm/RemoteCopyConnection.cpp @@ -46,7 +46,7 @@ //------------------------------------------------------------------------------ // constructor //------------------------------------------------------------------------------ -castor::vdqm::RemoteCopyConnection::RemoteCopyConnection(int socket) throw () : +castor::vdqm::RemoteCopyConnection::RemoteCopyConnection(int socket) throw() : AbstractTCPSocket(socket) {} //------------------------------------------------------------------------------ @@ -54,7 +54,7 @@ castor::vdqm::RemoteCopyConnection::RemoteCopyConnection(int socket) throw () : //------------------------------------------------------------------------------ castor::vdqm::RemoteCopyConnection::RemoteCopyConnection( const unsigned short port, const std::string host) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, host, false) { createSocket(); } @@ -64,7 +64,7 @@ castor::vdqm::RemoteCopyConnection::RemoteCopyConnection( //------------------------------------------------------------------------------ castor::vdqm::RemoteCopyConnection::RemoteCopyConnection( const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception) : + : AbstractTCPSocket(port, ip, false) { createSocket(); } @@ -73,7 +73,7 @@ castor::vdqm::RemoteCopyConnection::RemoteCopyConnection( //------------------------------------------------------------------------------ // destructor //------------------------------------------------------------------------------ -castor::vdqm::RemoteCopyConnection::~RemoteCopyConnection() throw () { +castor::vdqm::RemoteCopyConnection::~RemoteCopyConnection() throw() { ::shutdown(m_socket, SHUT_RDWR); this->close(); } @@ -83,7 +83,7 @@ castor::vdqm::RemoteCopyConnection::~RemoteCopyConnection() throw () { // connect //------------------------------------------------------------------------------ void castor::vdqm::RemoteCopyConnection::connect() - throw (castor::exception::Exception) { + { // Connects the socket if (::connect(m_socket, (struct sockaddr *)&m_saddr, sizeof(m_saddr)) < 0) { int tmpserrno = errno; @@ -125,7 +125,7 @@ bool castor::vdqm::RemoteCopyConnection::sendJob( const int clientEgid, const std::string &deviceGroupName, const std::string &tapeDriveName) - throw (castor::exception::Exception) { + { bool acknSucc = true; // The return value @@ -217,7 +217,7 @@ bool castor::vdqm::RemoteCopyConnection::sendJob( // readAnswer //------------------------------------------------------------------------------ bool castor::vdqm::RemoteCopyConnection::readAnswer(const Cuuid_t &cuuid, - const char *remoteCopyType) throw (castor::exception::Exception) { + const char *remoteCopyType) { char buffer[VDQM_MSGBUFSIZ]; diff --git a/castor/vdqm/RemoteCopyConnection.hpp b/castor/vdqm/RemoteCopyConnection.hpp index de50c7bbdc850bb358749367b7cf79b1725d230a..bb0b4396fe3d363ee7d6ce655b0c1da626843d04 100644 --- a/castor/vdqm/RemoteCopyConnection.hpp +++ b/castor/vdqm/RemoteCopyConnection.hpp @@ -49,7 +49,7 @@ namespace castor { * Constructor building a Socket objet around a regular socket * @param socket the regular socket used */ - RemoteCopyConnection(int socket) throw (); + RemoteCopyConnection(int socket) throw(); /** * Constructor building a socket on a given port of a given host @@ -59,7 +59,7 @@ namespace castor { */ RemoteCopyConnection(const unsigned short port, const std::string host) - throw (castor::exception::Exception); + ; /** * Constructor building a socket on a given port of a given host @@ -69,7 +69,7 @@ namespace castor { */ RemoteCopyConnection(const unsigned short port, const unsigned long ip) - throw (castor::exception::Exception); + ; /** @@ -82,7 +82,7 @@ namespace castor { * connects the socket to the given address */ virtual void connect() - throw (castor::exception::Exception); + ; /** @@ -106,7 +106,7 @@ namespace castor { const int clientEgid, const std::string &deviceGroupName, const std::string &tapeDriveName) - throw (castor::exception::Exception); + ; private: @@ -121,7 +121,7 @@ namespace castor { * @return false, in case of problems on RTCP side */ bool readAnswer(const Cuuid_t &cuuid, const char *remoteCopyType) - throw (castor::exception::Exception); + ; }; } // namespace vdqm diff --git a/castor/vdqm/RequestHandlerThread.cpp b/castor/vdqm/RequestHandlerThread.cpp index 4a2be060bfb7e2ab783f369b6b699574d7cbf514..2b21c49b0bc7068df1473cf952ae49b80f7c2d4a 100644 --- a/castor/vdqm/RequestHandlerThread.cpp +++ b/castor/vdqm/RequestHandlerThread.cpp @@ -34,14 +34,14 @@ // constructor //----------------------------------------------------------------------------- castor::vdqm::RequestHandlerThread::RequestHandlerThread() - throw () { + throw() { } //----------------------------------------------------------------------------- // destructor //----------------------------------------------------------------------------- castor::vdqm::RequestHandlerThread::~RequestHandlerThread() - throw () { + throw() { } //----------------------------------------------------------------------------- @@ -98,7 +98,7 @@ void castor::vdqm::RequestHandlerThread::run(void *param) //----------------------------------------------------------------------------- void castor::vdqm::RequestHandlerThread::handleRequest(Cuuid_t &cuuid, castor::io::ServerSocket &sock) - throw(castor::exception::Exception) { + { unsigned short port; // Client port unsigned long ip; // Client IP diff --git a/castor/vdqm/RequestHandlerThread.hpp b/castor/vdqm/RequestHandlerThread.hpp index 036f68ac6897f66f0d95ab68920721364688b250..66ee82898d611752ec6cadc7a68c00c3ea06555d 100644 --- a/castor/vdqm/RequestHandlerThread.hpp +++ b/castor/vdqm/RequestHandlerThread.hpp @@ -72,7 +72,7 @@ namespace castor { * @param sock The socket */ void handleRequest(Cuuid_t &cuuid, castor::io::ServerSocket &sock) - throw(castor::exception::Exception); + ; }; // class RequestHandlerThread diff --git a/castor/vdqm/SocketHelper.cpp b/castor/vdqm/SocketHelper.cpp index 17bb846cc08717b4f29786d89b42de988271d5e2..8475f26b271a455724c4990fd25e06bedc24a904 100644 --- a/castor/vdqm/SocketHelper.cpp +++ b/castor/vdqm/SocketHelper.cpp @@ -56,7 +56,7 @@ unsigned int castor::vdqm::SocketHelper::readMagicNumber( castor::io::ServerSocket &socket, const int timeout) - throw (castor::exception::Exception) { + { char buffer[sizeof(unsigned int)]; @@ -108,7 +108,7 @@ unsigned int castor::vdqm::SocketHelper::readMagicNumber( //------------------------------------------------------------------------------ void castor::vdqm::SocketHelper::netWriteVdqmHeader( castor::io::ServerSocket &socket, void *hdrbuf) - throw (castor::exception::Exception) { + { int rc = netwrite_timeout(socket.socket(), hdrbuf, VDQM_HDRBUFSIZ, VDQM_TIMEOUT); @@ -144,7 +144,7 @@ void castor::vdqm::SocketHelper::netWriteVdqmHeader( //------------------------------------------------------------------------------ void castor::vdqm::SocketHelper::netReadVdqmHeader( castor::io::ServerSocket &socket, void* hdrbuf) - throw (castor::exception::Exception) { + { int rc = netread_timeout(socket.socket(), hdrbuf, VDQM_HDRBUFSIZ, VDQM_TIMEOUT); @@ -181,7 +181,7 @@ void castor::vdqm::SocketHelper::netReadVdqmHeader( void castor::vdqm::SocketHelper::checkCupvPermissions( castor::io::ServerSocket &sock, const uid_t uid, const gid_t gid, const int privilege, const char *privilegeName, const char *messageType) - throw (castor::exception::PermissionDenied) { + { // Get local hostname std::string localHostname; try { diff --git a/castor/vdqm/SocketHelper.hpp b/castor/vdqm/SocketHelper.hpp index 9175c0af7bc1878b8112b697d844258be49e09b7..3cfc9749d5cc81467181d6270d193e1630b86c52 100644 --- a/castor/vdqm/SocketHelper.hpp +++ b/castor/vdqm/SocketHelper.hpp @@ -58,7 +58,7 @@ namespace castor { static unsigned int readMagicNumber( castor::io::ServerSocket &socket, const int timeout) - throw (castor::exception::Exception); + ; /** * Writes the contents of the specified header buffer to the specified @@ -69,7 +69,7 @@ namespace castor { * @exception In case of error */ static void netWriteVdqmHeader(castor::io::ServerSocket &socket, - void *hdrbuf) throw (castor::exception::Exception); + void *hdrbuf) ; /** * Reads the VDQM header from the specified socket into the specified @@ -79,7 +79,7 @@ namespace castor { * @param hdrbuf the header buffer where the data will be written to */ static void netReadVdqmHeader(castor::io::ServerSocket &socket, - void *hdrbuf) throw (castor::exception::Exception); + void *hdrbuf) ; /** * Throws a permission denied exception if the specified action is @@ -97,7 +97,7 @@ namespace castor { static void checkCupvPermissions(castor::io::ServerSocket &sock, const uid_t uid, const gid_t gid, const int privilege, const char *privilegeName, const char *messageType) - throw (castor::exception::PermissionDenied); + ; }; // class SocketHelper diff --git a/castor/vdqm/VdqmMagic2ProtocolInterpreter.cpp b/castor/vdqm/VdqmMagic2ProtocolInterpreter.cpp index ce23cf2bdecfad4410b9474aa69a7c2eb3374c4b..6299b166bc9f718b7669e33c95a4b6e2fa64f097 100644 --- a/castor/vdqm/VdqmMagic2ProtocolInterpreter.cpp +++ b/castor/vdqm/VdqmMagic2ProtocolInterpreter.cpp @@ -33,7 +33,7 @@ //------------------------------------------------------------------------------ castor::vdqm::VdqmMagic2ProtocolInterpreter::VdqmMagic2ProtocolInterpreter( castor::io::ServerSocket &socket, const Cuuid_t &cuuid) - throw(castor::exception::Exception) : m_socket(socket), m_cuuid(cuuid) { + : m_socket(socket), m_cuuid(cuuid) { } @@ -42,7 +42,7 @@ castor::vdqm::VdqmMagic2ProtocolInterpreter::VdqmMagic2ProtocolInterpreter( //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic2ProtocolInterpreter::readHeader( const unsigned int magic, vdqmHdr_t &header) - throw(castor::exception::Exception) { + { // Fill in the magic number which has already been read out from the socket header.magic = magic; @@ -78,7 +78,7 @@ void castor::vdqm::VdqmMagic2ProtocolInterpreter::readHeader( // readVolPriority //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic2ProtocolInterpreter::readVolPriority(const int len, - vdqmVolPriority_t &msg) throw(castor::exception::Exception) { + vdqmVolPriority_t &msg) { if(!VALID_VDQM_MSGLEN(len)) { castor::exception::Exception ex(SECONNDROP); diff --git a/castor/vdqm/VdqmMagic2ProtocolInterpreter.hpp b/castor/vdqm/VdqmMagic2ProtocolInterpreter.hpp index c16df59220b0330e36f177c8b62861b6a9d492ce..bf6ea1e1393bf7fee769e3aaa969b6a6610e1626 100644 --- a/castor/vdqm/VdqmMagic2ProtocolInterpreter.hpp +++ b/castor/vdqm/VdqmMagic2ProtocolInterpreter.hpp @@ -50,7 +50,7 @@ namespace castor { * @exception In case that one of the parameters is NULL */ VdqmMagic2ProtocolInterpreter(castor::io::ServerSocket &socket, - const Cuuid_t &cuuid)throw (castor::exception::Exception); + const Cuuid_t &cuuid); /** * Reads the message header of VDQM message with a magic number of @@ -63,7 +63,7 @@ namespace castor { * @param header The message header */ void readHeader(const unsigned int magic, vdqmHdr_t &header) - throw(castor::exception::Exception); + ; /** * Reads the message body of vdqmVolPriority message from the socket of @@ -75,7 +75,7 @@ namespace castor { * out into */ void readVolPriority(const int len, vdqmVolPriority_t &msg) - throw(castor::exception::Exception); + ; private: diff --git a/castor/vdqm/VdqmMagic3ProtocolInterpreter.cpp b/castor/vdqm/VdqmMagic3ProtocolInterpreter.cpp index 79ec3104693b6d3852f3ea08d3a2a1224b6f04af..979c0296266f52ac47ca9ad1d6080d1c7331e548 100644 --- a/castor/vdqm/VdqmMagic3ProtocolInterpreter.cpp +++ b/castor/vdqm/VdqmMagic3ProtocolInterpreter.cpp @@ -33,7 +33,7 @@ //------------------------------------------------------------------------------ castor::vdqm::VdqmMagic3ProtocolInterpreter::VdqmMagic3ProtocolInterpreter( castor::io::ServerSocket &socket, const Cuuid_t &cuuid) - throw(castor::exception::Exception) : m_socket(socket), m_cuuid(cuuid) { + : m_socket(socket), m_cuuid(cuuid) { } @@ -42,7 +42,7 @@ castor::vdqm::VdqmMagic3ProtocolInterpreter::VdqmMagic3ProtocolInterpreter( //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic3ProtocolInterpreter::readHeader( const unsigned int magic, vdqmHdr_t &header) - throw(castor::exception::Exception) { + { // Fill in the magic number which has already been read out from the socket header.magic = magic; @@ -78,7 +78,7 @@ void castor::vdqm::VdqmMagic3ProtocolInterpreter::readHeader( // readDelDrv //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic3ProtocolInterpreter::readDelDrv(const int len, - vdqmDelDrv_t &msg) throw(castor::exception::Exception) { + vdqmDelDrv_t &msg) { if(!VALID_VDQM_MSGLEN(len)) { castor::exception::Exception ex(SECONNDROP); @@ -137,7 +137,7 @@ void castor::vdqm::VdqmMagic3ProtocolInterpreter::readDelDrv(const int len, // readDedicate //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic3ProtocolInterpreter::readDedicate(const int len, - vdqmDedicate_t &msg) throw(castor::exception::Exception) { + vdqmDedicate_t &msg) { if(!VALID_VDQM_MSGLEN(len)) { castor::exception::Exception ex(SECONNDROP); diff --git a/castor/vdqm/VdqmMagic3ProtocolInterpreter.hpp b/castor/vdqm/VdqmMagic3ProtocolInterpreter.hpp index c3aa235585126e8b391a1508c70bc10b32b5a76c..f3da168b649803f99e016b52277fa408733381cb 100644 --- a/castor/vdqm/VdqmMagic3ProtocolInterpreter.hpp +++ b/castor/vdqm/VdqmMagic3ProtocolInterpreter.hpp @@ -50,7 +50,7 @@ namespace castor { * @exception In case that one of the parameters is NULL */ VdqmMagic3ProtocolInterpreter(castor::io::ServerSocket &socket, - const Cuuid_t &cuuid)throw (castor::exception::Exception); + const Cuuid_t &cuuid); /** * Reads the message header of VDQM message with a magic number of @@ -63,7 +63,7 @@ namespace castor { * @param header The message header */ void readHeader(const unsigned int magic, vdqmHdr_t &header) - throw(castor::exception::Exception); + ; /** * Reads the message body of a delete drive message from the socket of @@ -75,7 +75,7 @@ namespace castor { * should be read out into */ void readDelDrv(const int len, vdqmDelDrv_t &msg) - throw(castor::exception::Exception); + ; /** * Reads the message body of a dedicate message from the socket of this @@ -86,7 +86,7 @@ namespace castor { * @param msg The message body */ void readDedicate(const int len, vdqmDedicate_t &msg) - throw(castor::exception::Exception); + ; private: diff --git a/castor/vdqm/VdqmMagic4ProtocolInterpreter.cpp b/castor/vdqm/VdqmMagic4ProtocolInterpreter.cpp index 7a8cae46b2c7bcb1d2a9872cb7d19b478ac142e2..4a47ffd90f49e71a6a73fc86e398d870b162098b 100644 --- a/castor/vdqm/VdqmMagic4ProtocolInterpreter.cpp +++ b/castor/vdqm/VdqmMagic4ProtocolInterpreter.cpp @@ -34,7 +34,7 @@ //------------------------------------------------------------------------------ castor::vdqm::VdqmMagic4ProtocolInterpreter::VdqmMagic4ProtocolInterpreter( castor::io::ServerSocket &socket, const Cuuid_t &cuuid) - throw(castor::exception::Exception) : m_socket(socket), m_cuuid(cuuid) { + : m_socket(socket), m_cuuid(cuuid) { } @@ -43,7 +43,7 @@ castor::vdqm::VdqmMagic4ProtocolInterpreter::VdqmMagic4ProtocolInterpreter( //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic4ProtocolInterpreter::readHeader( const unsigned int magic, vdqmHdr_t &header) - throw(castor::exception::Exception) { + { // Fill in the magic number which has already been read out from the socket header.magic = magic; @@ -79,7 +79,7 @@ void castor::vdqm::VdqmMagic4ProtocolInterpreter::readHeader( // readAggregatorVolReq //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic4ProtocolInterpreter::readAggregatorVolReq( - const int len, vdqmVolReq_t &msg) throw(castor::exception::Exception) { + const int len, vdqmVolReq_t &msg) { if(!VALID_VDQM_MSGLEN(len)) { castor::exception::Exception ex(SECONNDROP); @@ -154,7 +154,7 @@ void castor::vdqm::VdqmMagic4ProtocolInterpreter::readAggregatorVolReq( // sendAggregatorVolReq //------------------------------------------------------------------------------ void castor::vdqm::VdqmMagic4ProtocolInterpreter::sendAggregatorVolReqToClient -(vdqmHdr_t&, vdqmVolReq_t &msg) throw(castor::exception::Exception) { +(vdqmHdr_t&, vdqmVolReq_t &msg) { char *p = NULL; diff --git a/castor/vdqm/VdqmMagic4ProtocolInterpreter.hpp b/castor/vdqm/VdqmMagic4ProtocolInterpreter.hpp index 3d9435bc4535229a9c3616f40b7d944830d8c3b6..9526d45821898c2956552efccb4f50284116373e 100644 --- a/castor/vdqm/VdqmMagic4ProtocolInterpreter.hpp +++ b/castor/vdqm/VdqmMagic4ProtocolInterpreter.hpp @@ -50,7 +50,7 @@ namespace castor { * @exception In case that one of the parameters is NULL */ VdqmMagic4ProtocolInterpreter(castor::io::ServerSocket &socket, - const Cuuid_t &cuuid)throw (castor::exception::Exception); + const Cuuid_t &cuuid); /** * Reads the message header of VDQM message with a magic number of @@ -63,7 +63,7 @@ namespace castor { * @param header The message header */ void readHeader(const unsigned int magic, vdqmHdr_t &header) - throw(castor::exception::Exception); + ; /** * Reads the message body of an aggregator volume request message from @@ -75,7 +75,7 @@ namespace castor { * should be read out into */ void readAggregatorVolReq(const int len, vdqmVolReq_t &msg) - throw(castor::exception::Exception); + ; /** * Sends the specified aggegartor volume request back to the client. @@ -84,7 +84,7 @@ namespace castor { * @param msg the message body */ void sendAggregatorVolReqToClient(vdqmHdr_t &header, vdqmVolReq_t &msg) - throw(castor::exception::Exception); + ; private: diff --git a/castor/vdqm/VdqmServer.cpp b/castor/vdqm/VdqmServer.cpp index b14b7b3057c9800195f3346d2e1267e333bc59d8..07fe750f11eda0d20dc3c0cd3ad7b19c532f7161 100644 --- a/castor/vdqm/VdqmServer.cpp +++ b/castor/vdqm/VdqmServer.cpp @@ -52,7 +52,7 @@ // constructor //------------------------------------------------------------------------------ castor::vdqm::VdqmServer::VdqmServer(std::ostream &stdOut, std::ostream &stdErr, - log::Logger &log) throw(castor::exception::Exception) : + log::Logger &log) : castor::server::MultiThreadedDaemon(stdOut, stdErr, log), m_requestHandlerThreadNumber(REQUESTHANDLERDEFAULTTHREADNUMBER), m_RTCPJobSubmitterThreadNumber(RTCPJOBSUBMITTERDEFAULTTHREADNUMBER), @@ -326,7 +326,7 @@ void castor::vdqm::VdqmServer::initDatabaseService(Cuuid_t &cuuid) { // getSchedulerTimeout //------------------------------------------------------------------------------ int castor::vdqm::VdqmServer::getSchedulerTimeout() - throw(castor::exception::InvalidConfigEntry) { + { int timeout = SCHEDULERTIMEOUT; // Initialise to default value char *const configEntry = getconfent("VDQM", "SCHEDULERTIMEOUT", 0); @@ -353,7 +353,7 @@ int castor::vdqm::VdqmServer::getSchedulerTimeout() // getRTCPJobSubmitterTimeout //------------------------------------------------------------------------------ int castor::vdqm::VdqmServer::getRTCPJobSubmitterTimeout() - throw(castor::exception::InvalidConfigEntry) { + { int timeout = RTCPJOBSUBMITTERTIMEOUT; // Initialise to default value char *const configEntry = getconfent("VDQM", "RTCPJOBSUBMITTERTIMEOUT", 0); @@ -380,7 +380,7 @@ int castor::vdqm::VdqmServer::getRTCPJobSubmitterTimeout() // getListenPort //------------------------------------------------------------------------------ int castor::vdqm::VdqmServer::getListenPort() - throw(castor::exception::InvalidConfigEntry) { + { int port = VDQMPORT; // Initialise to default value char *const configEntry = getconfent("VDQM", "PORT", 0); @@ -406,7 +406,7 @@ int castor::vdqm::VdqmServer::getListenPort() // getNotifyPort //------------------------------------------------------------------------------ int castor::vdqm::VdqmServer::getNotifyPort() - throw(castor::exception::InvalidConfigEntry) { + { int port = VDQMNOTIFYPORT; // Initialise to default value char *const configEntry = getconfent("VDQM", "NOTIFYPORT", 0); diff --git a/castor/vdqm/VdqmServer.hpp b/castor/vdqm/VdqmServer.hpp index 21677f390e927c0418b03f08c7311c2fa1e44b92..47234e75281aef0540c13924f96632707850dab5 100644 --- a/castor/vdqm/VdqmServer.hpp +++ b/castor/vdqm/VdqmServer.hpp @@ -52,7 +52,7 @@ namespace castor { * @param log Object representing the API of the CASTOR logging system. */ VdqmServer(std::ostream &stdOut, std::ostream &stdErr, - log::Logger &log) throw(castor::exception::Exception); + log::Logger &log) ; /** * Logs the start of the server. @@ -88,25 +88,25 @@ namespace castor { * Returns the scheduler timeout, in other words the time a scheduler * thread will sleep when there is no work to be done. */ - int getSchedulerTimeout() throw(castor::exception::InvalidConfigEntry); + int getSchedulerTimeout() ; /** * Returns the RTCP job submitter timeout, in other words the time an * RTCP job submitter thread will sleep when there is no work to be done. */ int getRTCPJobSubmitterTimeout() - throw(castor::exception::InvalidConfigEntry); + ; /** * Returns the port on which the server will listen. */ - int getListenPort() throw(castor::exception::InvalidConfigEntry); + int getListenPort() ; /** * Returns the UPD port on which the server will listen fori * notifications. */ - int getNotifyPort() throw(castor::exception::InvalidConfigEntry); + int getNotifyPort() ; /** * Returns the number of threads in the request handler thread pool. diff --git a/castor/vdqm/handler/BaseRequestHandler.cpp b/castor/vdqm/handler/BaseRequestHandler.cpp index 455797970e554a99bd1962af1c6e3d417d74acd5..ffff5609622a06cb1b10aa79dcaf4c584c58b2ba 100644 --- a/castor/vdqm/handler/BaseRequestHandler.cpp +++ b/castor/vdqm/handler/BaseRequestHandler.cpp @@ -47,7 +47,7 @@ // Constructor //------------------------------------------------------------------------------ castor::vdqm::handler::BaseRequestHandler::BaseRequestHandler() -throw(castor::exception::Exception) + { castor::IService* svc = NULL; diff --git a/castor/vdqm/handler/BaseRequestHandler.hpp b/castor/vdqm/handler/BaseRequestHandler.hpp index c51b61c0f66abd394cdb9fd68ed0c8f696bb3993..9f042c77cd254d5fbd545638223c421c4b5a3c7a 100644 --- a/castor/vdqm/handler/BaseRequestHandler.hpp +++ b/castor/vdqm/handler/BaseRequestHandler.hpp @@ -50,7 +50,7 @@ namespace castor { /** * Constructor */ - BaseRequestHandler() throw(castor::exception::Exception); + BaseRequestHandler() ; /** * Destructor diff --git a/castor/vdqm/handler/TapeDriveConsistencyChecker.cpp b/castor/vdqm/handler/TapeDriveConsistencyChecker.cpp index 90a53fe63ec09bbbe13d2aa962d427db245ac7e1..d4d11ec58fac8590ed70f48f0c431f42be67903c 100644 --- a/castor/vdqm/handler/TapeDriveConsistencyChecker.cpp +++ b/castor/vdqm/handler/TapeDriveConsistencyChecker.cpp @@ -47,7 +47,7 @@ castor::vdqm::handler::TapeDriveConsistencyChecker::TapeDriveConsistencyChecker( castor::vdqm::TapeDrive *const tapeDrive, vdqmDrvReq_t *const driveRequest, const Cuuid_t cuuid) - throw(castor::exception::Exception) : ptr_tapeDrive(tapeDrive), + : ptr_tapeDrive(tapeDrive), ptr_driveRequest(driveRequest), m_cuuid(cuuid) { if ( tapeDrive == NULL || driveRequest == NULL ) { @@ -71,7 +71,7 @@ castor::vdqm::handler::TapeDriveConsistencyChecker:: // checkConsistency //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveConsistencyChecker::checkConsistency() - throw (castor::exception::Exception) { + { TapeServer* tapeServer = ptr_tapeDrive->tapeServer(); @@ -194,7 +194,7 @@ void castor::vdqm::handler::TapeDriveConsistencyChecker::checkConsistency() // deleteOldRequest //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveConsistencyChecker::deleteOldRequest() - throw (castor::exception::Exception) { + { TapeRequest* runningTapeReq = ptr_tapeDrive->runningTapeReq(); @@ -239,7 +239,7 @@ void castor::vdqm::handler::TapeDriveConsistencyChecker::deleteOldRequest() // checkBusyConsistency //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveConsistencyChecker::checkBusyConsistency() - throw (castor::exception::Exception) { + { /* * Consistency check @@ -292,7 +292,7 @@ void castor::vdqm::handler::TapeDriveConsistencyChecker::checkBusyConsistency() // checkFreeConsistency //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveConsistencyChecker::checkFreeConsistency() - throw (castor::exception::Exception) { + { castor::vdqm::VdqmTape* tape; TapeServer* tapeServer = ptr_tapeDrive->tapeServer(); @@ -334,7 +334,7 @@ void castor::vdqm::handler::TapeDriveConsistencyChecker::checkFreeConsistency() // checkAssignConsistency //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveConsistencyChecker:: - checkAssignConsistency() throw (castor::exception::Exception) { + checkAssignConsistency() { TapeRequest* tapeRequest; TapeServer* tapeServer = ptr_tapeDrive->tapeServer(); diff --git a/castor/vdqm/handler/TapeDriveConsistencyChecker.hpp b/castor/vdqm/handler/TapeDriveConsistencyChecker.hpp index f409bbd85f424d14fa6d00a96678ec1d329f932b..79c5f01a5b25e1f947e479ff2f9f34d00cdddfc6 100644 --- a/castor/vdqm/handler/TapeDriveConsistencyChecker.hpp +++ b/castor/vdqm/handler/TapeDriveConsistencyChecker.hpp @@ -62,7 +62,7 @@ namespace castor { * * @exception If the consistency is not given */ - void checkConsistency() throw (castor::exception::Exception); + void checkConsistency() ; protected: @@ -77,7 +77,7 @@ namespace castor { TapeDriveConsistencyChecker( castor::vdqm::TapeDrive *const tapeDrive, vdqmDrvReq_t *const driveRequest, const Cuuid_t cuuid) - throw(castor::exception::Exception); + ; /** * Destructor @@ -99,7 +99,7 @@ namespace castor { * It is only used internally from checkConsistency. */ void deleteOldRequest() - throw (castor::exception::Exception); + ; /** * This function is written, to check the consistency, if the @@ -107,7 +107,7 @@ namespace castor { * It is only used internally from checkConsistency. */ void checkBusyConsistency() - throw (castor::exception::Exception); + ; /** * This function is written, to check the consistency, if the @@ -115,7 +115,7 @@ namespace castor { * It is only used internally from checkConsistency. */ void checkFreeConsistency() - throw (castor::exception::Exception); + ; /** * This function is written, to check the consistency, if the @@ -124,7 +124,7 @@ namespace castor { * It is only used internally from checkConsistency. */ void checkAssignConsistency() - throw (castor::exception::Exception); + ; }; // class TapeDriveConsistencyChecker diff --git a/castor/vdqm/handler/TapeDriveHandler.cpp b/castor/vdqm/handler/TapeDriveHandler.cpp index b8819c2ee2361af80999f9e29e15ac9c0259eaaf..a6a3f445436f97139f5ce5508f2efda0f169a2f2 100644 --- a/castor/vdqm/handler/TapeDriveHandler.cpp +++ b/castor/vdqm/handler/TapeDriveHandler.cpp @@ -129,7 +129,7 @@ throw() { //------------------------------------------------------------------------------ castor::vdqm::handler::TapeDriveHandler::TapeDriveHandler( vdqmHdr_t *const header, vdqmDrvReq_t *const driveRequest, - const Cuuid_t cuuid) throw(castor::exception::Exception) : + const Cuuid_t cuuid) : ptr_header(header), ptr_driveRequest(driveRequest), m_cuuid(cuuid){ if ( header == NULL || driveRequest == NULL ) { @@ -151,7 +151,7 @@ castor::vdqm::handler::TapeDriveHandler::~TapeDriveHandler() throw() { // newTapeDriveRequest //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveHandler::newTapeDriveRequest() - throw (castor::exception::Exception) { + { // XXX: This log doesn't appear in the log! //"The parameters of the old vdqm DrvReq Request" message @@ -245,7 +245,7 @@ void castor::vdqm::handler::TapeDriveHandler::newTapeDriveRequest() // deleteTapeDrive //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveHandler::deleteTapeDrive() - throw (castor::exception::Exception) { + { ptr_IVdqmService->deleteDrive(ptr_driveRequest->drive, ptr_driveRequest->server, ptr_driveRequest->dgn); @@ -257,7 +257,7 @@ void castor::vdqm::handler::TapeDriveHandler::deleteTapeDrive() //------------------------------------------------------------------------------ castor::vdqm::TapeDrive* castor::vdqm::handler::TapeDriveHandler::getTapeDrive(TapeServer* tapeServer) - throw (castor::exception::Exception) { + { castor::vdqm::TapeDrive* tapeDrive = NULL; castor::vdqm::DeviceGroupName* dgName = NULL; @@ -374,7 +374,7 @@ castor::vdqm::TapeDrive* //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveHandler::copyTapeDriveInformations( TapeDrive* tapeDrive) - throw (castor::exception::Exception) { + { if (tapeDrive == NULL) { castor::exception::InvalidArgument ex; ex.getMessage() << "The tapeDrive argument is NULL" << std::endl; @@ -438,7 +438,7 @@ void castor::vdqm::handler::TapeDriveHandler::copyTapeDriveInformations( // tapeDriveStatus2Bitset //------------------------------------------------------------------------------ int castor::vdqm::handler::TapeDriveHandler::tapeDriveStatus2Bitset( - const TapeDriveStatusCodes status) throw (castor::exception::Exception) { + const TapeDriveStatusCodes status) { switch(status) { case UNIT_UP: @@ -481,7 +481,7 @@ int castor::vdqm::handler::TapeDriveHandler::tapeDriveStatus2Bitset( void castor::vdqm::handler::TapeDriveHandler::printStatus( const int oldProtocolStatus, const int newActStatus) - throw (castor::exception::Exception) { + { std::string oldStatusString; @@ -585,7 +585,7 @@ void castor::vdqm::handler::TapeDriveHandler::printStatus( void castor::vdqm::handler::TapeDriveHandler::sendTapeDriveQueue( const vdqmVolReq_t *const, castor::vdqm::OldProtocolInterpreter *const oldProtInterpreter) - throw (castor::exception::Exception) { + { std::string dgn = ""; std::string server = ""; @@ -640,7 +640,7 @@ void castor::vdqm::handler::TapeDriveHandler::sendTapeDriveQueue( // dedicateTapeDrive //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveHandler::dedicateTapeDrive() - throw (castor::exception::Exception) { + { // Try to dedicate the drive ptr_IVdqmService->dedicateDrive( @@ -656,7 +656,7 @@ void castor::vdqm::handler::TapeDriveHandler::dedicateTapeDrive() //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveHandler::handleTapeDriveCompatibilities( castor::vdqm::TapeDrive *newTapeDrive, std::string driveModel) - throw (castor::exception::Exception) { + { castor::vdqm::DeviceGroupName *dgName = NULL; castor::vdqm::TapeDriveCompatibility *driveCompatibility = NULL; diff --git a/castor/vdqm/handler/TapeDriveHandler.hpp b/castor/vdqm/handler/TapeDriveHandler.hpp index 535e13bd10a28b5dab6f95aa2cc260990dcef9c4..b5eeb3bac34ac992db227692bbb195bd73d03daa 100644 --- a/castor/vdqm/handler/TapeDriveHandler.hpp +++ b/castor/vdqm/handler/TapeDriveHandler.hpp @@ -65,7 +65,7 @@ namespace castor { */ TapeDriveHandler(vdqmHdr_t *const header, vdqmDrvReq_t *const driveRequest, const Cuuid_t cuuid) - throw(castor::exception::Exception); + ; /** * Destructor. @@ -78,14 +78,14 @@ namespace castor { * the request into the data Base or updates the status of existing * TapeDrives in the db. */ - void newTapeDriveRequest() throw (castor::exception::Exception); + void newTapeDriveRequest() ; /** * This function replaces the old vdqm_DelDrvReq() C-function and is * called, when a VDQM_DEL_DRVREQ message comes from a client. It * deletes the TapeDrive with the specified ID in the db. */ - void deleteTapeDrive() throw (castor::exception::Exception); + void deleteTapeDrive() ; /** * This function replaces the old vdqm_GetDrvQueue() C-function. @@ -98,7 +98,7 @@ namespace castor { */ void sendTapeDriveQueue(const vdqmVolReq_t *const volumeRequest, OldProtocolInterpreter *const oldProtInterpreter) - throw (castor::exception::Exception); + ; /** * This method replaces the old vdqm_DedicateDrv() C-function. @@ -106,7 +106,7 @@ namespace castor { * and to hosts. */ void dedicateTapeDrive() - throw (castor::exception::Exception); + ; private: @@ -160,7 +160,7 @@ namespace castor { * @exception In case of error */ TapeDrive* getTapeDrive(TapeServer* tapeServer) - throw (castor::exception::Exception); + ; /** * Copies the informations of the tape drive, which it has received @@ -171,7 +171,7 @@ namespace castor { * @exception In case of error */ void copyTapeDriveInformations(TapeDrive* tapeDrive) - throw (castor::exception::Exception); + ; /** * Returns the equivalent VDQM1 bitset of the VDQM2 tape drive status. @@ -181,7 +181,7 @@ namespace castor { * @exception if the specified VDQM2 tape drive status is unknown. */ int tapeDriveStatus2Bitset(const TapeDriveStatusCodes status) - throw (castor::exception::Exception); + ; /** * Creates a log messages for the old and new status code. If the @@ -193,7 +193,7 @@ namespace castor { * @exception In case of error */ void printStatus(const int oldProtocolStatus, const int newActStatus) - throw (castor::exception::Exception); + ; /** * Connects the new tape drive with the TapeDriveCompatibility objects. @@ -207,7 +207,7 @@ namespace castor { */ void handleTapeDriveCompatibilities( castor::vdqm::TapeDrive *newTapeDrive, std::string driveModel) - throw (castor::exception::Exception); + ; }; // class TapeDriveHandler diff --git a/castor/vdqm/handler/TapeDriveStatusHandler.cpp b/castor/vdqm/handler/TapeDriveStatusHandler.cpp index 126e3501857e6bcae79e9214159b347c32bc75e3..087808f5663a47c0c4f0ace0c6f3f06698b18767 100644 --- a/castor/vdqm/handler/TapeDriveStatusHandler.cpp +++ b/castor/vdqm/handler/TapeDriveStatusHandler.cpp @@ -49,7 +49,7 @@ castor::vdqm::handler::TapeDriveStatusHandler::TapeDriveStatusHandler( castor::vdqm::TapeDrive *const tapeDrive, vdqmDrvReq_t *const driveRequest, const Cuuid_t &cuuid, u_signed64 *const newRequestId) - throw(castor::exception::Exception) : ptr_tapeDrive(tapeDrive), + : ptr_tapeDrive(tapeDrive), ptr_driveRequest(driveRequest), m_cuuid(cuuid), ptr_newRequestId(newRequestId) { @@ -78,7 +78,7 @@ castor::vdqm::handler::TapeDriveStatusHandler::~TapeDriveStatusHandler() // handleOldStatus //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveStatusHandler::handleOldStatus() - throw (castor::exception::Exception) { + { if ( ptr_tapeDrive->status() != UNIT_DOWN && ptr_tapeDrive->status() != STATUS_UNKNOWN) { @@ -150,7 +150,7 @@ void castor::vdqm::handler::TapeDriveStatusHandler::handleOldStatus() // handleVolMountStatus //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveStatusHandler::handleVolMountStatus() - throw (castor::exception::Exception) { + { TapeRequest* tapeRequest = ptr_tapeDrive->runningTapeReq(); TapeServer* tapeServer = ptr_tapeDrive->tapeServer(); @@ -280,7 +280,7 @@ void castor::vdqm::handler::TapeDriveStatusHandler::handleVolMountStatus() // handleVolUnmountStatus //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveStatusHandler::handleVolUnmountStatus() - throw (castor::exception::Exception) { + { delete ptr_tapeDrive->tape(); ptr_tapeDrive->setTape(NULL); @@ -367,7 +367,7 @@ void castor::vdqm::handler::TapeDriveStatusHandler::handleVolUnmountStatus() // handleUnitReleaseStatus //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveStatusHandler::handleUnitReleaseStatus() - throw (castor::exception::Exception) { + { TapeRequest* tapeRequest = ptr_tapeDrive->runningTapeReq(); castor::vdqm::VdqmTape* tape = ptr_tapeDrive->tape(); @@ -610,7 +610,7 @@ void castor::vdqm::handler::TapeDriveStatusHandler::handleUnitReleaseStatus() // handleUnitFreeStatus //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeDriveStatusHandler::handleUnitFreeStatus() - throw (castor::exception::Exception) { + { TapeRequest* tapeRequest = NULL; diff --git a/castor/vdqm/handler/TapeDriveStatusHandler.hpp b/castor/vdqm/handler/TapeDriveStatusHandler.hpp index 19f1de72145f8e4a4a10629239508a8a9db27b38..c34bae47aeb1858380d5c721306505aaecaa1286 100644 --- a/castor/vdqm/handler/TapeDriveStatusHandler.hpp +++ b/castor/vdqm/handler/TapeDriveStatusHandler.hpp @@ -58,7 +58,7 @@ namespace castor { * * @exception In case of error */ - void handleOldStatus() throw (castor::exception::Exception); + void handleOldStatus() ; protected: @@ -80,7 +80,7 @@ namespace castor { TapeDriveStatusHandler(castor::vdqm::TapeDrive *const tapeDrive, vdqmDrvReq_t *const driveRequest, const Cuuid_t &cuuid, u_signed64 *const newRequestId) - throw(castor::exception::Exception); + ; /** * Destructor @@ -102,7 +102,7 @@ namespace castor { * * @exception In case of error */ - void handleVolMountStatus() throw (castor::exception::Exception); + void handleVolMountStatus() ; /** * This function is only used internally from handleOldStatus() to @@ -111,7 +111,7 @@ namespace castor { * * @exception In case of error */ - void handleVolUnmountStatus() throw (castor::exception::Exception); + void handleVolUnmountStatus() ; /** * This function is only used internally from handleOldStatus() to @@ -120,7 +120,7 @@ namespace castor { * * @exception In case of error */ - void handleUnitReleaseStatus() throw (castor::exception::Exception); + void handleUnitReleaseStatus() ; /** * This function is only used internally from handleOldStatus() to @@ -129,7 +129,7 @@ namespace castor { * * @exception In case of error */ - void handleUnitFreeStatus() throw (castor::exception::Exception); + void handleUnitFreeStatus() ; }; // class TapeDriveStatusHandler diff --git a/castor/vdqm/handler/TapeRequestHandler.cpp b/castor/vdqm/handler/TapeRequestHandler.cpp index dd9af6ed52091b461cc1fc6bb0d7f65905f97b41..bf23a71aab9452b97ebe6e94f3b01f590cdf16be 100644 --- a/castor/vdqm/handler/TapeRequestHandler.cpp +++ b/castor/vdqm/handler/TapeRequestHandler.cpp @@ -71,7 +71,7 @@ // Constructor //------------------------------------------------------------------------------ castor::vdqm::handler::TapeRequestHandler::TapeRequestHandler() - throw(castor::exception::Exception) { + { } @@ -86,7 +86,7 @@ castor::vdqm::handler::TapeRequestHandler::~TapeRequestHandler() throw() { //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeRequestHandler::newTapeRequest( const vdqmHdr_t &header, vdqmVolReq_t &msg, const Cuuid_t &cuuid) - throw (castor::exception::Exception) { + { // Used to get information about the tape struct vmgr_tape_info_byte_u64 tape_info; @@ -248,7 +248,7 @@ void castor::vdqm::handler::TapeRequestHandler::newTapeRequest( //------------------------------------------------------------------------------ void castor::vdqm::handler::TapeRequestHandler::deleteTapeRequest( const vdqmVolReq_t *const volumeRequest, const Cuuid_t cuuid, - castor::io::ServerSocket &sock) throw (castor::exception::Exception) { + castor::io::ServerSocket &sock) { // The tape request may be associated with a drive, and if so a lock will // be required on both the request and the drive. Care must be taken as @@ -429,7 +429,7 @@ void castor::vdqm::handler::TapeRequestHandler::deleteTapeRequest( //------------------------------------------------------------------------------ int castor::vdqm::handler::TapeRequestHandler::getQueuePosition( const vdqmVolReq_t *const volumeRequest, const Cuuid_t cuuid) - throw (castor::exception::Exception) { + { //To store the db related informations int queuePosition = @@ -460,7 +460,7 @@ int castor::vdqm::handler::TapeRequestHandler::getQueuePosition( void castor::vdqm::handler::TapeRequestHandler::sendTapeRequestQueue( vdqmHdr_t *const header, vdqmVolReq_t *const volumeRequest, castor::vdqm::OldProtocolInterpreter *const oldProtInterpreter, - const Cuuid_t) throw (castor::exception::Exception) { + const Cuuid_t) { std::string dgn = ""; std::string server = ""; diff --git a/castor/vdqm/handler/TapeRequestHandler.hpp b/castor/vdqm/handler/TapeRequestHandler.hpp index 96ae5515a7b8e7d3d36321d0ecde32abbb76ee06..11da8b1c8c597042172b60a9b1408e1ba59b926b 100644 --- a/castor/vdqm/handler/TapeRequestHandler.hpp +++ b/castor/vdqm/handler/TapeRequestHandler.hpp @@ -50,7 +50,7 @@ namespace castor { /** * Constructor */ - TapeRequestHandler() throw(castor::exception::Exception); + TapeRequestHandler() ; /** * Destructor @@ -67,7 +67,7 @@ namespace castor { */ void newTapeRequest(const vdqmHdr_t &header, vdqmVolReq_t &msg, const Cuuid_t &cuuid) - throw (castor::exception::Exception); + ; /** * Deletes a TapeRequest from the DB. The request must have the same @@ -81,7 +81,7 @@ namespace castor { */ void deleteTapeRequest(const vdqmVolReq_t *volumeRequest, const Cuuid_t cuuid, castor::io::ServerSocket &sock) - throw (castor::exception::Exception); + ; /** * This function replaces the old vdqm_GetQueuePos() C-function. It @@ -94,7 +94,7 @@ namespace castor { * -1: if there is no entry for it. */ int getQueuePosition(const vdqmVolReq_t *const VolReq, - const Cuuid_t cuuid) throw (castor::exception::Exception); + const Cuuid_t cuuid) ; /** * This function replaces the old vdqm_GetVolQueue() C-function. @@ -109,7 +109,7 @@ namespace castor { void sendTapeRequestQueue(vdqmHdr_t *const header, vdqmVolReq_t *const volumeRequest, OldProtocolInterpreter *const oldProtInterpreter, - const Cuuid_t cuuid) throw (castor::exception::Exception); + const Cuuid_t cuuid) ; }; // class TapeRequestHandler } // end of namespace handler diff --git a/castor/vdqm/handler/VdqmMagic2RequestHandler.cpp b/castor/vdqm/handler/VdqmMagic2RequestHandler.cpp index 3d9d79c21db4e7435dea8b008017c6c23372a6b0..41df48662d3abac72539eb71f273b2dc2bee5905 100644 --- a/castor/vdqm/handler/VdqmMagic2RequestHandler.cpp +++ b/castor/vdqm/handler/VdqmMagic2RequestHandler.cpp @@ -32,7 +32,7 @@ void castor::vdqm::handler::VdqmMagic2RequestHandler::handleVolPriority( const Cuuid_t &cuuid, vdqmVolPriority_t &msg) - throw (castor::exception::Exception) { + { castor::dlf::Param param[] = { castor::dlf::Param("priority" , msg.priority), castor::dlf::Param("clientUID" , msg.clientUID), diff --git a/castor/vdqm/handler/VdqmMagic2RequestHandler.hpp b/castor/vdqm/handler/VdqmMagic2RequestHandler.hpp index 0e32bca94440fe11c14452a0ccc95c1b721dbc59..05b713be7e0da2b77f13109b827a12bfff5051ee 100644 --- a/castor/vdqm/handler/VdqmMagic2RequestHandler.hpp +++ b/castor/vdqm/handler/VdqmMagic2RequestHandler.hpp @@ -52,7 +52,7 @@ namespace castor { */ void handleVolPriority(const Cuuid_t &cuuid, vdqmVolPriority_t &msg) - throw (castor::exception::Exception); + ; }; // class VdqmMagic2RequestHandler diff --git a/castor/vdqm/handler/VdqmMagic3RequestHandler.cpp b/castor/vdqm/handler/VdqmMagic3RequestHandler.cpp index bbb1b382b8f7ad2e81c7b1a488541bf042fde867..7760a627442981cb44b13b9e95da3c0a8c830a73 100644 --- a/castor/vdqm/handler/VdqmMagic3RequestHandler.cpp +++ b/castor/vdqm/handler/VdqmMagic3RequestHandler.cpp @@ -35,7 +35,7 @@ void castor::vdqm::handler::VdqmMagic3RequestHandler::handleDelDrv( castor::io::ServerSocket &socket, const Cuuid_t &cuuid, - vdqmDelDrv_t &msg) throw (castor::exception::Exception) { + vdqmDelDrv_t &msg) { castor::dlf::Param param[] = { castor::dlf::Param("clientUID" , msg.clientUID), @@ -56,7 +56,7 @@ void castor::vdqm::handler::VdqmMagic3RequestHandler::handleDelDrv( void castor::vdqm::handler::VdqmMagic3RequestHandler::handleDedicate( castor::io::ServerSocket &socket, const Cuuid_t &cuuid, vdqmDedicate_t &msg) - throw (castor::exception::Exception) { + { castor::dlf::Param param[] = { castor::dlf::Param("clientUID" , msg.clientUID), castor::dlf::Param("clientGID" , msg.clientGID), diff --git a/castor/vdqm/handler/VdqmMagic3RequestHandler.hpp b/castor/vdqm/handler/VdqmMagic3RequestHandler.hpp index 0e9d13e67e718a540f8165039c20bb252679496e..1612c79999dea08ea4f753a10bebdd8ed52bd25a 100644 --- a/castor/vdqm/handler/VdqmMagic3RequestHandler.hpp +++ b/castor/vdqm/handler/VdqmMagic3RequestHandler.hpp @@ -53,7 +53,7 @@ namespace castor { */ void handleDelDrv(castor::io::ServerSocket &socket, const Cuuid_t &cuuid, vdqmDelDrv_t &msg) - throw (castor::exception::Exception); + ; /** * Handlers the specified dedicate message. @@ -63,7 +63,7 @@ namespace castor { */ void handleDedicate(castor::io::ServerSocket &socket, const Cuuid_t &cuuid, vdqmDedicate_t &msg) - throw (castor::exception::Exception); + ; }; // class VdqmMagic3RequestHandler diff --git a/castor/vdqm/handler/VdqmMagic4RequestHandler.cpp b/castor/vdqm/handler/VdqmMagic4RequestHandler.cpp index e33365d6221c51d9789f9aa3cb61122807046421..aaf9d260b0c1f78d5c9ee3f0e7851b7c0364b9ee 100644 --- a/castor/vdqm/handler/VdqmMagic4RequestHandler.cpp +++ b/castor/vdqm/handler/VdqmMagic4RequestHandler.cpp @@ -37,7 +37,7 @@ void castor::vdqm::handler::VdqmMagic4RequestHandler::handleAggregatorVolReq( castor::io::ServerSocket&, const Cuuid_t &cuuid, const vdqmHdr_t &header, vdqmVolReq_t &msg) - throw (castor::exception::Exception) { + { castor::dlf::Param param[] = { castor::dlf::Param("VolReqID" , msg.VolReqID), diff --git a/castor/vdqm/handler/VdqmMagic4RequestHandler.hpp b/castor/vdqm/handler/VdqmMagic4RequestHandler.hpp index e52ec0c5aeec8f32b8926a0fa7cb096092c256a9..b6b5a1f2e9afe86e882fbbecb03e036a3c278610 100644 --- a/castor/vdqm/handler/VdqmMagic4RequestHandler.hpp +++ b/castor/vdqm/handler/VdqmMagic4RequestHandler.hpp @@ -53,7 +53,7 @@ namespace castor { */ void handleAggregatorVolReq(castor::io::ServerSocket &socket, const Cuuid_t &cuuid, const vdqmHdr_t &header, vdqmVolReq_t &msg) - throw (castor::exception::Exception); + ; }; // class VdqmMagic4RequestHandler diff --git a/castor/vdqm/vdqmDBInit.cpp b/castor/vdqm/vdqmDBInit.cpp index 5c69105ebbf3e592aeb40c2ecec8ba9f6e67d01c..5427c3945242bd2ab6d30b205bff5a618b68b5c5 100644 --- a/castor/vdqm/vdqmDBInit.cpp +++ b/castor/vdqm/vdqmDBInit.cpp @@ -59,7 +59,7 @@ void usage(char *cmd) { // handleRequest //------------------------------------------------------------------------------ void handleRequest(castor::IObject* fr, castor::Services* svcs) - throw (castor::exception::Exception) { + { // Stores it into the data base castor::BaseAddress ad; @@ -124,7 +124,7 @@ void handleRequest(castor::IObject* fr, castor::Services* svcs) * Main loop for initializing the data base */ void initDB(castor::Services* svcs, castor::vdqm::IVdqmSvc* iVdqmService) - throw (castor::exception::Exception) { + { bool dgnUpdate = false; bool tasUpdate = false; diff --git a/client/src/stager/stager_abort.cpp b/client/src/stager/stager_abort.cpp index f3bd95173e855b1c0843a03a9d7091b7bb4c2777..c611e190d2ef54d5f84d693d68d4e0f5d8ba58d6 100644 --- a/client/src/stager/stager_abort.cpp +++ b/client/src/stager/stager_abort.cpp @@ -64,7 +64,7 @@ void usage(char* cmd) { } void parseFileIdNshost(std::string input, castor::stager::NsFileId &nsFileId) - throw (castor::exception::Exception) { + { std::string::size_type p = input.find('@', 0); if (p == std::string::npos) { castor::exception::InvalidArgument e; @@ -87,7 +87,7 @@ void parseFileIdNshost(std::string input, castor::stager::NsFileId &nsFileId) void cmd_parse(int argc, char *argv[], castor::stager::StageAbortRequest &req) - throw (castor::exception::Exception) { + { bool gotUuid = false; Coptind = 1; Copterr = 1; diff --git a/client/src/stager/stager_client_api_changePrivilege.cpp b/client/src/stager/stager_client_api_changePrivilege.cpp index 5d04dbc63e4a6d60bb0db155f59abdf8d80ab172..e696b9d5d4a06b9cf03c7e90644a9d7e4a184bdb 100644 --- a/client/src/stager/stager_client_api_changePrivilege.cpp +++ b/client/src/stager/stager_client_api_changePrivilege.cpp @@ -45,7 +45,7 @@ // getUserId //----------------------------------------------------------------------------- void getUserId(std::string name, castor::bwlist::BWUser *u) - throw (castor::exception::InvalidArgument) { + { // empty user name means any and is thus mapped to -1 if (name.size() == 0) { u->setEuid(-1); @@ -75,7 +75,7 @@ void getUserId(std::string name, castor::bwlist::BWUser *u) // getGroupId //----------------------------------------------------------------------------- void getGroupId(std::string name, castor::bwlist::BWUser *u) - throw (castor::exception::InvalidArgument) { + { // empty group name, just ignore if (name.size() == 0) { return; @@ -101,7 +101,7 @@ void getGroupId(std::string name, castor::bwlist::BWUser *u) // getRequestTypeId //----------------------------------------------------------------------------- int getRequestTypeId(std::string type) - throw (castor::exception::InvalidArgument) { + { // empty type name means any and is thus mapped to 0 if (type.size() == 0) return 0; // get type id, here we go for a dummy O(n) listing @@ -121,7 +121,7 @@ int getRequestTypeId(std::string type) void parseUsers(char *susers, castor::bwlist::ChangePrivilege * req, std::vector<castor::bwlist::BWUser*> &users) - throw (castor::exception::Exception) { + { // check for empty user list if (strlen(susers) == 0) { castor::exception::InvalidArgument e; @@ -179,7 +179,7 @@ void parseUsers(char *susers, void parseRequestTypes(char *sreqTypes, castor::bwlist::ChangePrivilege * req, std::vector<castor::bwlist::RequestType*> &reqTypes) - throw (castor::exception::Exception) { + { std::stringstream s(sreqTypes); while (!s.eof() && ! s.bad()) { // get next type diff --git a/client/src/stager/stager_client_api_common.cpp b/client/src/stager/stager_client_api_common.cpp index 99af06c1cb12dbb23134d4d4956b433bca18faae..be7f187935a9ff3466a9f8133ae492a4349e12d6 100644 --- a/client/src/stager/stager_client_api_common.cpp +++ b/client/src/stager/stager_client_api_common.cpp @@ -335,7 +335,7 @@ EXTERN_C int stage_resetid() { void castor::client::setClientAuthorizationId (castor::client::BaseClient &client) - throw(castor::exception::Exception) { + { uid_t authUid; gid_t authGid; @@ -350,7 +350,7 @@ void castor::client::setClientAuthorizationId } int setDefaultOption(struct stage_options* opts) - throw(castor::exception::Exception) { + { if ((!opts) || (!opts->stage_host)) { castor::exception::Exception e(SENOSHOST); e.getMessage() << "Unable to find a value for STAGE_HOST.\n" diff --git a/client/src/stager/stager_client_api_listPrivileges.cpp b/client/src/stager/stager_client_api_listPrivileges.cpp index aed27ca0c959d835875cc70a4d59fc42b83564e9..4049fdf89b0c634b1e2b9029ad0bc0dd56713b73 100644 --- a/client/src/stager/stager_client_api_listPrivileges.cpp +++ b/client/src/stager/stager_client_api_listPrivileges.cpp @@ -52,7 +52,7 @@ public: m_result(result) {} virtual void handleResponse(castor::rh::Response& r) - throw (castor::exception::Exception) { + { if (0 != r.errorCode()) { castor::exception::Exception e(r.errorCode()); e.getMessage() << r.errorMessage(); @@ -78,7 +78,7 @@ public: resp->privileges().clear(); }; virtual void terminate() - throw (castor::exception::Exception) {}; + {}; private: // where to store the diskCopy std::vector<castor::bwlist::Privilege*>* m_result; diff --git a/codeGeneration/gencastor/umbrello/codegenerators/cpphbasecnvwriter.cpp b/codeGeneration/gencastor/umbrello/codegenerators/cpphbasecnvwriter.cpp index 398e73271fead9d2eac13f554091e0563f3d80bf..fd3788c40d466447b7c05dc5cf12e66118c93694 100644 --- a/codeGeneration/gencastor/umbrello/codegenerators/cpphbasecnvwriter.cpp +++ b/codeGeneration/gencastor/umbrello/codegenerators/cpphbasecnvwriter.cpp @@ -30,7 +30,7 @@ void CppHBaseCnvWriter::writeMethods (bool delUpMethods) { << " cnvSvc);" << endl << endl; writeDocumentation("", "Destructor", "", *m_stream); *m_stream << getIndent() << "virtual " << "~" << m_prefix - << m_classInfo->className << "Cnv() throw();" << endl + << m_classInfo->className << "Cnv() throw ;" << endl << endl; // Methods concerning object type writeDocumentation diff --git a/codeGeneration/gencastor/umbrello/codegenerators/cpphclasswriter.cpp b/codeGeneration/gencastor/umbrello/codegenerators/cpphclasswriter.cpp index fe5b92c87f15f95df992a53e2012b4ad25913cfb..c1759d72ce5dde8980fb6c9d2e8305fb6770ebe6 100644 --- a/codeGeneration/gencastor/umbrello/codegenerators/cpphclasswriter.cpp +++ b/codeGeneration/gencastor/umbrello/codegenerators/cpphclasswriter.cpp @@ -230,7 +230,7 @@ void CppHClassWriter::writeClassDecl(UMLClassifier *c, void CppHClassWriter::writeConstructorDecls(QTextStream &stream) { if (!m_classInfo->isInterface) { writeDocumentation("", "Empty Constructor", "", stream); - stream << getIndent() << m_classInfo->className << "() throw();" + stream << getIndent() << m_classInfo->className << "() throw ;" << endl << endl; } writeDocumentation("", "Empty Destructor", "", stream); diff --git a/h/stager_client_api_authid.hpp b/h/stager_client_api_authid.hpp index 5e9cc8a4de98c02b40baf0378852814d6e7b0f45..0a94c76e3b15af820092bcb6e338c16eb81ef81a 100644 --- a/h/stager_client_api_authid.hpp +++ b/h/stager_client_api_authid.hpp @@ -39,7 +39,7 @@ namespace castor { */ void setClientAuthorizationId (castor::client::BaseClient &client) - throw(castor::exception::Exception); + ; } } diff --git a/h/stager_client_api_common.hpp b/h/stager_client_api_common.hpp index ea7e562636dec6860b3843348b881ae48de1a35a..79605d94ba8ecaa1bd8af3a79ae1b0b5dd76ae01 100644 --- a/h/stager_client_api_common.hpp +++ b/h/stager_client_api_common.hpp @@ -46,5 +46,5 @@ EXTERN_C int stage_resetid(); int setDefaultOption(struct stage_options* opts) - throw(castor::exception::Exception); + ; diff --git a/test/castor/db/testClob.cpp b/test/castor/db/testClob.cpp index 22d1d728f4399d835288008c02c24ca50e6e4052..11bc37bacf21ab91e311a258099e1680a8434984 100644 --- a/test/castor/db/testClob.cpp +++ b/test/castor/db/testClob.cpp @@ -60,7 +60,7 @@ class occiClob string url; void insertRows (Connection *conn) - throw (SQLException) + { cout << "insertRows" << endl; Statement *stmt = conn->createStatement ("INSERT INTO clobstest(id, longdata) VALUES (:v1,:v2)"); @@ -82,7 +82,7 @@ class occiClob * populating the clob uses write method; */ void populateClob (Clob &clob,unsigned int way, string value) - throw (SQLException) + { if (way == USE_NORM) { @@ -102,7 +102,7 @@ class occiClob * printing the clob data as integer stream */ void dumpClob (Clob &clob,unsigned int way) - throw (SQLException) + { if (clob.isNull()) { @@ -135,7 +135,7 @@ class occiClob } void runSample () - throw (SQLException) + { Environment *env = Environment::createEnvironment ( Environment::DEFAULT); diff --git a/test/castor/db/vector_occi.cpp b/test/castor/db/vector_occi.cpp index eea22525fc0c3ec827839d1e4507d659220c5287..8fdba0f0fed6ac530b5e6a2246629f05507c9b76 100644 --- a/test/castor/db/vector_occi.cpp +++ b/test/castor/db/vector_occi.cpp @@ -22,7 +22,7 @@ namespace localUtils { void append (const std::string& s) { m_what += s; } - virtual const char * what() const throw () { + virtual const char * what() const throw() { return m_what.c_str(); } private: diff --git a/test/ns/TestCnsStatThread.cpp b/test/ns/TestCnsStatThread.cpp index 0a19199290acbf8c4f373c6f4b7911d425d9a473..2c5690b2022bd838968259ead389a9a1eb39a1c5 100644 --- a/test/ns/TestCnsStatThread.cpp +++ b/test/ns/TestCnsStatThread.cpp @@ -71,7 +71,7 @@ TestCnsStatThread::TestCnsStatThread() : // cnsStat //------------------------------------------------------------------------------ u_signed64 TestCnsStatThread::cnsStat(oracle::occi::Statement* m_cnsStatStatement, std::string filepath) - throw (castor::exception::Exception) { + { u_signed64 fileid = 0; try { // Check whether the statements are ok diff --git a/test/ns/TestCnsStatThread.hpp b/test/ns/TestCnsStatThread.hpp index 27c8bf08eafc9be0ccdfad13b8d5edefba5086ff..eb80e42c621b1597248e2acf2f12795b9fed945e 100644 --- a/test/ns/TestCnsStatThread.hpp +++ b/test/ns/TestCnsStatThread.hpp @@ -58,6 +58,6 @@ class TestCnsStatThread : public castor::server::IThread, castor::server::Mutex* m; u_signed64 cnsStat(oracle::occi::Statement* m_cnsStatStatement, std::string filepath) - throw (castor::exception::Exception); + ; }; diff --git a/test/unittest/castor/tape/rmc/TestingRmcDaemon.hpp b/test/unittest/castor/tape/rmc/TestingRmcDaemon.hpp index 7dfc84f8685b1152d6b877ff57b2ce6f0eaa3e36..b6f6fd361798042b1c4aa5e44139b432180fbb3e 100644 --- a/test/unittest/castor/tape/rmc/TestingRmcDaemon.hpp +++ b/test/unittest/castor/tape/rmc/TestingRmcDaemon.hpp @@ -34,7 +34,7 @@ class TestingRmcDaemon: public RmcDaemon { public: TestingRmcDaemon(std::ostream &stdOut, std::ostream &stdIn, - log::Logger &logger) throw(castor::exception::Exception): + log::Logger &logger) : RmcDaemon(stdOut, stdIn, logger) { } diff --git a/test/unittest/castor/tape/tapebridge/BridgeClientInfo2SenderTest.cpp b/test/unittest/castor/tape/tapebridge/BridgeClientInfo2SenderTest.cpp index 98512e3c0695d70bed6c60b089bef6a38f9f7f1c..552b7be5e9963bde5275d28274d07ff028e99361 100644 --- a/test/unittest/castor/tape/tapebridge/BridgeClientInfo2SenderTest.cpp +++ b/test/unittest/castor/tape/tapebridge/BridgeClientInfo2SenderTest.cpp @@ -153,7 +153,7 @@ public: void test_submit_std_exception(legacymsg::RtcpJobReplyMsgBody - &reply) throw(std::exception) { + &reply) { const std::string rtcpdHost("127.0.0.1");; const unsigned int rtcpdPort = FAKE_RTCPD_LISTEN_PORT; const int netReadWriteTimeout = 5; /* 5 seconds */ diff --git a/test/unittest/castor/tape/tapebridge/BridgeProtocolEngineTest.cpp b/test/unittest/castor/tape/tapebridge/BridgeProtocolEngineTest.cpp index 718e584c995c97aa8ab5c56481078c2447a5678a..f3f0d10fb3558c3b208e909fb5501359269180c6 100644 --- a/test/unittest/castor/tape/tapebridge/BridgeProtocolEngineTest.cpp +++ b/test/unittest/castor/tape/tapebridge/BridgeProtocolEngineTest.cpp @@ -261,7 +261,7 @@ private: const ClientAddress &clientAddress, const std::string &dgn, const std::string &driveUnit - ) throw(std::exception) { + ) { try { return new ClientProxy( cuuid, @@ -695,7 +695,7 @@ public: const bool checkRtcpdIsConnectingFromLocalHost, IClientProxy &clientProxy, ILegacyTxRx &legacyTxRx) - throw(std::exception) { + { TestingBridgeProtocolEngine *engine = NULL; try { diff --git a/test/unittest/castor/tape/tapebridge/DummyClientProxy.hpp b/test/unittest/castor/tape/tapebridge/DummyClientProxy.hpp index 2e2d62959843681d96fc667d5856b666985279a0..d94ccf94c06bba5dc7eaabb950412e3b199d17d9 100644 --- a/test/unittest/castor/tape/tapebridge/DummyClientProxy.hpp +++ b/test/unittest/castor/tape/tapebridge/DummyClientProxy.hpp @@ -45,7 +45,7 @@ public: tapegateway::Volume *getVolume( const uint64_t tapebridgeTransId) - throw(castor::exception::Exception) { + { return NULL; } @@ -53,7 +53,7 @@ public: const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception) { + { return -1; } @@ -61,7 +61,7 @@ public: *receiveFilesToMigrateListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) { + { return NULL; } @@ -69,7 +69,7 @@ public: const uint64_t tapebridgeTransId, const uint64_t maxFiles, const uint64_t maxBytes) const - throw(castor::exception::Exception) { + { return -1; } @@ -77,38 +77,38 @@ public: *receiveFilesToRecallListRequestReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) { + { return NULL; } void receiveNotificationReplyAndClose( const uint64_t tapebridgeTransId, const int clientSock) const - throw(castor::exception::Exception) { + { // Do nothing } tapegateway::DumpParameters *getDumpParameters( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) { + { return NULL; } void notifyDumpMessage( const uint64_t tapebridgeTransId, const char (&message)[CA_MAXLINELEN+1]) const - throw(castor::exception::Exception) { + { // Do nothing } void ping( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) { + { // Do nothing } IObject *receiveReplyAndClose(const int clientSock) const - throw(castor::exception::Exception) { + { return NULL; } @@ -117,13 +117,13 @@ public: const uint32_t actualMountTransactionId, const uint64_t expectedTapebridgeTransId, const uint64_t actualTapebridgeTransId) const - throw(castor::exception::Exception) { + { // Do nothing } void notifyEndOfSession( const uint64_t tapebridgeTransId) const - throw(castor::exception::Exception) { + { // Do nothing } @@ -131,14 +131,14 @@ public: const uint64_t tapebridgeTransId, const int errorCode, const std::string &errorMessage) const - throw(castor::exception::Exception) { + { // Do nothing } int connectAndSendMessage( IObject &message, timeval &connectDuration) const - throw(castor::exception::Exception) { + { return -1; } }; // class DummyClientProxy diff --git a/test/unittest/castor/tape/tapebridge/PendingMigrationsStoreTest.cpp b/test/unittest/castor/tape/tapebridge/PendingMigrationsStoreTest.cpp index dc30d33583a10607a92b7326c0c903d79a0a18e0..cf3a442fb3430f2491090a8861ada8d6d2cee320 100644 --- a/test/unittest/castor/tape/tapebridge/PendingMigrationsStoreTest.cpp +++ b/test/unittest/castor/tape/tapebridge/PendingMigrationsStoreTest.cpp @@ -618,12 +618,12 @@ private: castor::tape::tapebridge::FileWrittenNotificationList dataFlushedToTape( castor::tape::tapebridge::PendingMigrationsStore &store, - const uint32_t tapeFseqOfFlush) throw(std::exception) { + const uint32_t tapeFseqOfFlush) { try { return store.dataFlushedToTape(tapeFseqOfFlush); } catch(castor::exception::Exception &ex) { test_exception te(ex.getMessage().str()); - throw(te); + throw te; } } @@ -634,12 +634,12 @@ private: void fileWrittenWithoutFlush( castor::tape::tapebridge::PendingMigrationsStore &store, const castor::tape::tapebridge::FileWrittenNotification - ¬ification) throw(std::exception) { + ¬ification) { try { store.fileWrittenWithoutFlush(notification); } catch(castor::exception::Exception &ex) { test_exception te(ex.getMessage().str()); - throw(te); + throw te; } } }; // class PendingMigrationsStoreTest diff --git a/test/unittest/castor/tape/tapebridge/TestingBridgeProtocolEngine.hpp b/test/unittest/castor/tape/tapebridge/TestingBridgeProtocolEngine.hpp index 8bf5d1f3696523d41e5eb519a8d1f250d95238e0..f720b4156618640d73a2a1c6b0230873ee178fd5 100644 --- a/test/unittest/castor/tape/tapebridge/TestingBridgeProtocolEngine.hpp +++ b/test/unittest/castor/tape/tapebridge/TestingBridgeProtocolEngine.hpp @@ -78,7 +78,7 @@ public: using BridgeProtocolEngine::processSocksInALoop; void handleSelectEvents(struct timeval selectTimeout) - throw(std::exception) { + { try { BridgeProtocolEngine::handleSelectEvents(selectTimeout); } catch(castor::exception::Exception &ex) { diff --git a/test/unittest/unittest.cpp b/test/unittest/unittest.cpp index 413ab415fcbc0a295acd0a67ef27865cb4bcdb64..2d30ef17d9c09784a8d4420bbc629cd21bd207f4 100644 --- a/test/unittest/unittest.cpp +++ b/test/unittest/unittest.cpp @@ -47,7 +47,7 @@ // createLocalListenSocket //----------------------------------------------------------------------------- int unittest::createLocalListenSocket(const char *const listenSockPath) - throw (std::exception) { + { using namespace castor::tape; // Delete the file to be used for the socket if the file already exists @@ -201,7 +201,7 @@ void unittest::writeRtcopyAck( const int sockFd, const uint32_t magic, const uint32_t reqType) - throw(std::exception) { + { using namespace castor::tape; char ackBuf[12]; @@ -222,7 +222,7 @@ void unittest::writeRtcopyAck( // connectionHasBeenClosedByPeer //----------------------------------------------------------------------------- bool unittest::connectionHasBeenClosedByPeer(const int sockFd) - throw(std::exception) { + { fd_set readFds; FD_ZERO(&readFds); FD_SET(sockFd, &readFds); @@ -246,7 +246,7 @@ bool unittest::connectionHasBeenClosedByPeer(const int sockFd) } test_exception te(errorMessage + strerrbuf); - throw(te); + throw te; } } @@ -277,7 +277,7 @@ bool unittest::connectionHasBeenClosedByPeer(const int sockFd) } test_exception te(errorMessage + strerrbuf); - throw(te); + throw te; } } @@ -297,7 +297,7 @@ void unittest::readAck( const uint32_t magic, const uint32_t reqType, const uint32_t status) - throw(std::exception) { + { using namespace castor::tape; const int netReadWriteTimeout = 1; @@ -333,7 +333,7 @@ void unittest::readAck( ": expected=0x" << std::hex << magic << " actual=0x" << header.magic; test_exception te(errorMessage.str()); - throw(te); + throw te; } if(reqType != header.reqType) { @@ -344,7 +344,7 @@ void unittest::readAck( ": expected=0x" << std::hex << reqType << " actual=0x" << header.reqType; test_exception te(errorMessage.str()); - throw(te); + throw te; } if(status != header.lenOrStatus) { @@ -355,7 +355,7 @@ void unittest::readAck( ": expected=" << status << " actual=" << header.lenOrStatus; test_exception te(errorMessage.str()); - throw(te); + throw te; } } @@ -367,7 +367,7 @@ void unittest::writeRTCP_REQUEST_MORE_WORK( const int sockFd, const uint32_t volReqId, const char *const tapePath) - throw(std::exception) { + { using namespace castor::tape; legacymsg::RtcpFileRqstErrMsgBody msgBody; @@ -423,7 +423,7 @@ void unittest::writeRTCP_REQUEST_MORE_WORK( // writeRTCP_ENDOF_REQ //----------------------------------------------------------------------------- void unittest::writeRTCP_ENDOF_REQ(const int sockFd) - throw(std::exception) { + { using namespace castor::tape; castor::tape::legacymsg::MessageHeader endofReqMsg; @@ -475,7 +475,7 @@ void unittest::writeRTCP_FINISHED( const uint64_t bytesIn, const uint64_t bytesOut, const struct castor::tape::legacymsg::RtcpSegmentAttributes &segAttr) - throw(std::exception) { + { using namespace castor::tape; legacymsg::RtcpFileRqstErrMsgBody msgBody; @@ -536,7 +536,7 @@ void unittest::writeRTCP_FINISHED( int unittest::netAcceptConnection( const int listenSockFd, const time_t &timeout) - throw(std::exception) { + { using namespace castor::tape; try { diff --git a/test/unittest/unittest.hpp b/test/unittest/unittest.hpp index 5657fd799d792849eb20299ae255d38bf2abf6c5..87026ad0ee0dc6deb601aa9a8243948e4084c431 100644 --- a/test/unittest/unittest.hpp +++ b/test/unittest/unittest.hpp @@ -40,7 +40,7 @@ namespace unittest { * @return A descriptor referencing the newly created socket. */ int createLocalListenSocket(const char *const listenSockPath) - throw (std::exception); + ; /** * Reads in, acknowledges and drops the specified number of RTCOPY messages @@ -89,7 +89,7 @@ namespace unittest { const int sockFd, const uint32_t magic, const uint32_t reqType) - throw(std::exception); + ; /** * Returns true if the connection associated with the specified @@ -101,7 +101,7 @@ namespace unittest { * @param sockFd A file-descriptor referencing the socket of the connection * to be tested. */ - bool connectionHasBeenClosedByPeer(const int sockFd) throw(std::exception); + bool connectionHasBeenClosedByPeer(const int sockFd) ; /** * Reads in an RTCOPY acknowledgement message from the connection associated @@ -118,7 +118,7 @@ namespace unittest { const uint32_t magic, const uint32_t reqType, const uint32_t status) - throw(std::exception); + ; /** * Writes a RTCP_REQUEST_MORE_WORK message to the specified connection. @@ -133,7 +133,7 @@ namespace unittest { const int sockFd, const uint32_t volReqId, const char *const tapePath) - throw(std::exception); + ; /** * Write an RTCP_ENDOF_REQ message to the specified connection. @@ -142,7 +142,7 @@ namespace unittest { * to be written to. */ void writeRTCP_ENDOF_REQ(const int sockFd) - throw(std::exception); + ; /** * Writes an RTCP_FINISHED message to the specified connection. @@ -170,7 +170,7 @@ namespace unittest { const uint64_t bytesIn, const uint64_t bytesOut, const struct castor::tape::legacymsg::RtcpSegmentAttributes &segAttr) - throw(std::exception); + ; /** * Wrapper around the castor::tape::net::acceptConnection() method that @@ -183,6 +183,6 @@ namespace unittest { int netAcceptConnection( const int listenSockFd, const time_t &timeout) - throw(std::exception); + ; } // namespace unittest diff --git a/xrootd/XrdxCastorClient.cpp b/xrootd/XrdxCastorClient.cpp index 04dd0d30bf5cec2af7ddd026c3694a3f991bddd5..52d8d673588f3275f35a6ae7b6da9e66317e8333 100644 --- a/xrootd/XrdxCastorClient.cpp +++ b/xrootd/XrdxCastorClient.cpp @@ -52,7 +52,7 @@ XCASTORNAMESPACE_BEGIN // Constructor //------------------------------------------------------------------------------ XrdxCastorClient::XrdxCastorClient() - throw(castor::exception::Exception): + : LogId(), mNfds(0), mDoStop(false), @@ -102,7 +102,7 @@ XrdxCastorClient::XrdxCastorClient() //------------------------------------------------------------------------------ // Destructor //------------------------------------------------------------------------------ -XrdxCastorClient::~XrdxCastorClient() throw () +XrdxCastorClient::~XrdxCastorClient() throw() { if (0 != mCallbackSocket) delete mCallbackSocket; } @@ -136,7 +136,7 @@ XrdxCastorClient::SendAsyncRequest(const std::string& userId, castor::stager::Request* req, castor::client::IResponseHandler* rh, std::vector<castor::rh::Response*>* respvec) - throw(castor::exception::Exception) + { int ret = SFS_OK; diff --git a/xrootd/XrdxCastorClient.hpp b/xrootd/XrdxCastorClient.hpp index f3e0430d03b75d8f6facba23b4ca109ecabd7f7c..2c18c14c0b67ef142b665c74da34166f5f72369a 100644 --- a/xrootd/XrdxCastorClient.hpp +++ b/xrootd/XrdxCastorClient.hpp @@ -76,7 +76,7 @@ public : //---------------------------------------------------------------------------- //! Destructor //---------------------------------------------------------------------------- - virtual ~XrdxCastorClient() throw (); + virtual ~XrdxCastorClient() throw(); //---------------------------------------------------------------------------- @@ -100,7 +100,7 @@ public : castor::stager::Request* req, castor::client::IResponseHandler* rh, std::vector<castor::rh::Response*>* respvec) - throw(castor::exception::Exception); + ; //---------------------------------------------------------------------------- @@ -280,7 +280,7 @@ private: //---------------------------------------------------------------------------- //! Constructor //---------------------------------------------------------------------------- - XrdxCastorClient() throw (castor::exception::Exception); + XrdxCastorClient() ; //----------------------------------------------------------------------------