Commit 545f3228 authored by David COME's avatar David COME
Browse files

Removed ALL exception specifications all over castor (expect empty ones)

parent 8b57f78f
...@@ -85,7 +85,7 @@ void castor::BaseCnvSvc::removeAlias(const unsigned int id) { ...@@ -85,7 +85,7 @@ void castor::BaseCnvSvc::removeAlias(const unsigned int id) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
castor::IConverter* castor::BaseCnvSvc::converter castor::IConverter* castor::BaseCnvSvc::converter
(const unsigned int origObjType) (const unsigned int origObjType)
throw (castor::exception::Exception) { {
// First uses aliases // First uses aliases
unsigned int objType = origObjType; unsigned int objType = origObjType;
if (m_aliases.find(objType) != m_aliases.end()) { if (m_aliases.find(objType) != m_aliases.end()) {
...@@ -121,7 +121,7 @@ void castor::BaseCnvSvc::createRep(castor::IAddress* address, ...@@ -121,7 +121,7 @@ void castor::BaseCnvSvc::createRep(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
bool endTransaction, bool endTransaction,
unsigned int type) unsigned int type)
throw (castor::exception::Exception) { {
// If no object, nothing to create // If no object, nothing to create
if (0 != object) { if (0 != object) {
// Look for an adapted converter // Look for an adapted converter
...@@ -139,7 +139,7 @@ void castor::BaseCnvSvc::bulkCreateRep(castor::IAddress* address, ...@@ -139,7 +139,7 @@ void castor::BaseCnvSvc::bulkCreateRep(castor::IAddress* address,
std::vector<castor::IObject*> &objects, std::vector<castor::IObject*> &objects,
bool endTransaction, bool endTransaction,
unsigned int type) unsigned int type)
throw (castor::exception::Exception) { {
// If no object, nothing to create // If no object, nothing to create
if (objects.size() > 0) { if (objects.size() > 0) {
// Look for an adapted converter // Look for an adapted converter
...@@ -157,7 +157,7 @@ void castor::BaseCnvSvc::bulkCreateRep(castor::IAddress* address, ...@@ -157,7 +157,7 @@ void castor::BaseCnvSvc::bulkCreateRep(castor::IAddress* address,
void castor::BaseCnvSvc::updateRep(castor::IAddress* address, void castor::BaseCnvSvc::updateRep(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception) { {
// If no object, nothing to update // If no object, nothing to update
if (0 != object) { if (0 != object) {
// Look for an adapted converter // Look for an adapted converter
...@@ -174,7 +174,7 @@ void castor::BaseCnvSvc::updateRep(castor::IAddress* address, ...@@ -174,7 +174,7 @@ void castor::BaseCnvSvc::updateRep(castor::IAddress* address,
void castor::BaseCnvSvc::deleteRep(castor::IAddress* address, void castor::BaseCnvSvc::deleteRep(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception) { {
// Look for an adapted converter // Look for an adapted converter
// The converter is always valid if no exception is thrown // The converter is always valid if no exception is thrown
IConverter* conv = converter(object->type()); IConverter* conv = converter(object->type());
...@@ -187,7 +187,7 @@ void castor::BaseCnvSvc::deleteRep(castor::IAddress* address, ...@@ -187,7 +187,7 @@ void castor::BaseCnvSvc::deleteRep(castor::IAddress* address,
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
castor::IObject* castor::BaseCnvSvc::createObj castor::IObject* castor::BaseCnvSvc::createObj
(castor::IAddress* address) (castor::IAddress* address)
throw (castor::exception::Exception) { {
// Look for an adapted converter // Look for an adapted converter
// The converter is always valid if no exception is thrown // The converter is always valid if no exception is thrown
castor::IConverter* conv = converter(address->objType()); castor::IConverter* conv = converter(address->objType());
...@@ -199,7 +199,7 @@ castor::IObject* castor::BaseCnvSvc::createObj ...@@ -199,7 +199,7 @@ castor::IObject* castor::BaseCnvSvc::createObj
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
std::vector<castor::IObject*> castor::BaseCnvSvc::bulkCreateObj std::vector<castor::IObject*> castor::BaseCnvSvc::bulkCreateObj
(castor::IAddress* address) (castor::IAddress* address)
throw (castor::exception::Exception) { {
// Look for an adapted converter // Look for an adapted converter
// The converter is always valid if no exception is thrown // The converter is always valid if no exception is thrown
castor::IConverter* conv = converter(address->objType()); castor::IConverter* conv = converter(address->objType());
...@@ -210,7 +210,7 @@ std::vector<castor::IObject*> castor::BaseCnvSvc::bulkCreateObj ...@@ -210,7 +210,7 @@ std::vector<castor::IObject*> castor::BaseCnvSvc::bulkCreateObj
// updateObj // updateObj
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void castor::BaseCnvSvc::updateObj(castor::IObject* object) void castor::BaseCnvSvc::updateObj(castor::IObject* object)
throw (castor::exception::Exception) { {
// Look for an adapted converter // Look for an adapted converter
// The converter is always valid if no exception is thrown // The converter is always valid if no exception is thrown
castor::IConverter* conv = converter(object->type()); castor::IConverter* conv = converter(object->type());
...@@ -224,7 +224,7 @@ void castor::BaseCnvSvc::fillRep(castor::IAddress* address, ...@@ -224,7 +224,7 @@ void castor::BaseCnvSvc::fillRep(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
unsigned int type, unsigned int type,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception) { {
// Look for an adapted converter // Look for an adapted converter
// The converter is always valid if no exception is thrown // The converter is always valid if no exception is thrown
castor::IConverter* conv = converter(object->type()); castor::IConverter* conv = converter(object->type());
...@@ -238,7 +238,7 @@ void castor::BaseCnvSvc::fillObj(castor::IAddress* address, ...@@ -238,7 +238,7 @@ void castor::BaseCnvSvc::fillObj(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
unsigned int type, unsigned int type,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception) { {
// Look for an adapted converter // Look for an adapted converter
// The converter is always valid if no exception is thrown // The converter is always valid if no exception is thrown
castor::IConverter* conv = converter(object->type()); castor::IConverter* conv = converter(object->type());
...@@ -250,7 +250,7 @@ void castor::BaseCnvSvc::fillObj(castor::IAddress* address, ...@@ -250,7 +250,7 @@ void castor::BaseCnvSvc::fillObj(castor::IAddress* address,
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void castor::BaseCnvSvc::deleteRepByAddress (castor::IAddress* address, void castor::BaseCnvSvc::deleteRepByAddress (castor::IAddress* address,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception) { {
castor::IObject* obj = createObj(address); castor::IObject* obj = createObj(address);
address->setObjType(obj->type()); address->setObjType(obj->type());
deleteRep(address, obj, endTransaction); deleteRep(address, obj, endTransaction);
...@@ -260,7 +260,7 @@ void castor::BaseCnvSvc::deleteRepByAddress (castor::IAddress* address, ...@@ -260,7 +260,7 @@ void castor::BaseCnvSvc::deleteRepByAddress (castor::IAddress* address,
// commit // commit
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::BaseCnvSvc::commit() void castor::BaseCnvSvc::commit()
throw (castor::exception::Exception) { {
// Default implementation, does nothing. // Default implementation, does nothing.
} }
...@@ -268,7 +268,7 @@ void castor::BaseCnvSvc::commit() ...@@ -268,7 +268,7 @@ void castor::BaseCnvSvc::commit()
// rollback // rollback
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::BaseCnvSvc::rollback() void castor::BaseCnvSvc::rollback()
throw (castor::exception::Exception) { {
// Default implementation, does nothing. // Default implementation, does nothing.
} }
...@@ -276,7 +276,7 @@ void castor::BaseCnvSvc::rollback() ...@@ -276,7 +276,7 @@ void castor::BaseCnvSvc::rollback()
// createStatement // createStatement
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::db::IDbStatement* castor::BaseCnvSvc::createStatement(const std::string&) castor::db::IDbStatement* castor::BaseCnvSvc::createStatement(const std::string&)
throw (castor::exception::Exception) { {
// Default implementation, does nothing. // Default implementation, does nothing.
return 0; return 0;
} }
...@@ -91,7 +91,7 @@ namespace castor { ...@@ -91,7 +91,7 @@ namespace castor {
* is found * is found
*/ */
virtual IConverter* converter(const unsigned int objType) virtual IConverter* converter(const unsigned int objType)
throw (castor::exception::Exception); ;
/** /**
* gets the representation type, that is the type of * gets the representation type, that is the type of
...@@ -115,7 +115,7 @@ namespace castor { ...@@ -115,7 +115,7 @@ namespace castor {
IObject* object, IObject* object,
bool endTransaction, bool endTransaction,
unsigned int type = OBJ_INVALID) unsigned int type = OBJ_INVALID)
throw (castor::exception::Exception); ;
/** /**
* create foreign representations from a set of C++ Object * create foreign representations from a set of C++ Object
...@@ -133,7 +133,7 @@ namespace castor { ...@@ -133,7 +133,7 @@ namespace castor {
std::vector<IObject*> &objects, std::vector<IObject*> &objects,
bool endTransaction, bool endTransaction,
unsigned int type) unsigned int type)
throw (castor::exception::Exception); ;
/** /**
* Updates foreign representation from a C++ Object. * Updates foreign representation from a C++ Object.
...@@ -147,7 +147,7 @@ namespace castor { ...@@ -147,7 +147,7 @@ namespace castor {
virtual void updateRep(IAddress* address, virtual void updateRep(IAddress* address,
IObject* object, IObject* object,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception); ;
/** /**
* Deletes foreign representation of a C++ Object. * Deletes foreign representation of a C++ Object.
...@@ -161,7 +161,7 @@ namespace castor { ...@@ -161,7 +161,7 @@ namespace castor {
virtual void deleteRep(castor::IAddress* address, virtual void deleteRep(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception); ;
/** /**
* Creates C++ object from foreign representation * Creates C++ object from foreign representation
...@@ -173,7 +173,7 @@ namespace castor { ...@@ -173,7 +173,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual IObject* createObj (IAddress* address) virtual IObject* createObj (IAddress* address)
throw (castor::exception::Exception); ;
/** /**
* create C++ objects from foreign representations * create C++ objects from foreign representations
...@@ -185,7 +185,7 @@ namespace castor { ...@@ -185,7 +185,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual std::vector<IObject*> bulkCreateObj(IAddress* address) virtual std::vector<IObject*> bulkCreateObj(IAddress* address)
throw (castor::exception::Exception); ;
/** /**
* Updates C++ object from its foreign representation. * Updates C++ object from its foreign representation.
...@@ -193,7 +193,7 @@ namespace castor { ...@@ -193,7 +193,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual void updateObj(IObject* object) virtual void updateObj(IObject* object)
throw (castor::exception::Exception); ;
/** /**
* Fill the foreign representation with some of the objects * Fill the foreign representation with some of the objects
...@@ -209,7 +209,7 @@ namespace castor { ...@@ -209,7 +209,7 @@ namespace castor {
castor::IObject* object, castor::IObject* object,
unsigned int type, unsigned int type,
bool endTransaction = false) bool endTransaction = false)
throw (castor::exception::Exception); ;
/** /**
* Retrieve from the foreign representation some of the * Retrieve from the foreign representation some of the
...@@ -225,7 +225,7 @@ namespace castor { ...@@ -225,7 +225,7 @@ namespace castor {
castor::IObject* object, castor::IObject* object,
unsigned int type, unsigned int type,
bool endTransaction = false) bool endTransaction = false)
throw (castor::exception::Exception); ;
/** /**
* Forces the commit of the last changes. * Forces the commit of the last changes.
...@@ -235,7 +235,7 @@ namespace castor { ...@@ -235,7 +235,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual void commit() virtual void commit()
throw (castor::exception::Exception); ;
/** /**
* Forces the rollback of the last changes * Forces the rollback of the last changes
...@@ -245,7 +245,7 @@ namespace castor { ...@@ -245,7 +245,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual void rollback() virtual void rollback()
throw (castor::exception::Exception); ;
/** /**
* Creates a prepared statement wrapped with the * Creates a prepared statement wrapped with the
...@@ -253,7 +253,7 @@ namespace castor { ...@@ -253,7 +253,7 @@ namespace castor {
* @param stmt the string statement to be prepared * @param stmt the string statement to be prepared
*/ */
virtual castor::db::IDbStatement* createStatement(const std::string& stmt) virtual castor::db::IDbStatement* createStatement(const std::string& stmt)
throw (castor::exception::Exception); ;
/** /**
* Deletes foreign representation of a C++ Object without * Deletes foreign representation of a C++ Object without
...@@ -268,7 +268,7 @@ namespace castor { ...@@ -268,7 +268,7 @@ namespace castor {
*/ */
virtual void deleteRepByAddress (IAddress* address, virtual void deleteRepByAddress (IAddress* address,
bool endTransaction = true) bool endTransaction = true)
throw (castor::exception::Exception); ;
private: private:
/** /**
......
...@@ -45,7 +45,7 @@ castor::BaseObject::BaseObject() throw() {} ...@@ -45,7 +45,7 @@ castor::BaseObject::BaseObject() throw() {}
// sharedServices // sharedServices
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::Services* castor::BaseObject::sharedServices() castor::Services* castor::BaseObject::sharedServices()
throw (castor::exception::Exception) { {
// since this is the shared version, the instantiation of the singleton // since this is the shared version, the instantiation of the singleton
// has to be thread-safe. // has to be thread-safe.
if (0 == s_sharedServices) { if (0 == s_sharedServices) {
...@@ -62,7 +62,7 @@ castor::Services* castor::BaseObject::sharedServices() ...@@ -62,7 +62,7 @@ castor::Services* castor::BaseObject::sharedServices()
// svcs // svcs
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::Services* castor::BaseObject::svcs() castor::Services* castor::BaseObject::svcs()
throw (castor::exception::Exception) { {
return services(); return services();
} }
...@@ -70,7 +70,7 @@ castor::Services* castor::BaseObject::svcs() ...@@ -70,7 +70,7 @@ castor::Services* castor::BaseObject::svcs()
// services // services
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::Services* castor::BaseObject::services() castor::Services* castor::BaseObject::services()
throw (castor::exception::Exception) { {
castor::Services *services = castor::Services *services =
(castor::Services *)pthread_getspecific(s_servicesKey); (castor::Services *)pthread_getspecific(s_servicesKey);
...@@ -95,7 +95,7 @@ castor::Services* castor::BaseObject::services() ...@@ -95,7 +95,7 @@ castor::Services* castor::BaseObject::services()
// resetServices // resetServices
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void castor::BaseObject::resetServices() void castor::BaseObject::resetServices()
throw (castor::exception::Exception) { {
// If the services where not allocated (unlikely), this will have the // If the services where not allocated (unlikely), this will have the
// side effect of allocating them. The key will be created anyhow, // side effect of allocating them. The key will be created anyhow,
// which is what we need. // which is what we need.
......
...@@ -55,24 +55,24 @@ namespace castor { ...@@ -55,24 +55,24 @@ namespace castor {
/** /**
* Static access to the underlying thread-safe Services object * 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 * Static function to reset (deallocate + set the thread specific pointer
* to NULL) the thread-specific services. Useful in test environments and * to NULL) the thread-specific services. Useful in test environments and
* for clients which to not run the thread pools (but use the marshallers) * 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 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 * Non static access to the underlying Services object
*/ */
Services* svcs() throw(castor::exception::Exception); Services* svcs() ;
protected: protected:
...@@ -88,7 +88,7 @@ namespace castor { ...@@ -88,7 +88,7 @@ namespace castor {
*/ */
class pthreadKey { class pthreadKey {
public: public:
pthreadKey() throw (castor::exception::Exception) { pthreadKey() {
int rc = pthread_key_create(&m_key, NULL); int rc = pthread_key_create(&m_key, NULL);
if (rc != 0) { if (rc != 0) {
castor::exception::Exception e(rc); castor::exception::Exception e(rc);
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
const std::string castor::IClientFactory::client2String const std::string castor::IClientFactory::client2String
(const castor::IClient &cl) (const castor::IClient &cl)
throw (castor::exception::Exception) { {
switch (cl.type()) { switch (cl.type()) {
case castor::OBJ_Client : case castor::OBJ_Client :
{ {
...@@ -67,7 +67,7 @@ const std::string castor::IClientFactory::client2String ...@@ -67,7 +67,7 @@ const std::string castor::IClientFactory::client2String
// string2Client // string2Client
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
castor::IClient* castor::IClientFactory::string2Client(const std::string &st) castor::IClient* castor::IClientFactory::string2Client(const std::string &st)
throw (castor::exception::Exception) { {
std::istringstream in(st); std::istringstream in(st);
unsigned int type; unsigned int type;
in >> type; in >> type;
......
...@@ -51,7 +51,7 @@ namespace castor { ...@@ -51,7 +51,7 @@ namespace castor {
*/ */
static const std::string client2String static const std::string client2String
(const castor::IClient &cl) (const castor::IClient &cl)
throw (castor::exception::Exception); ;
/** /**
* creates a Client from its human readable * creates a Client from its human readable
...@@ -64,7 +64,7 @@ namespace castor { ...@@ -64,7 +64,7 @@ namespace castor {
*/ */
static castor::IClient* string2Client static castor::IClient* string2Client
(const std::string &st) (const std::string &st)
throw (castor::exception::Exception); ;
}; // end of class IClientFactory }; // end of class IClientFactory
......
...@@ -76,7 +76,7 @@ namespace castor { ...@@ -76,7 +76,7 @@ namespace castor {
IObject* object, IObject* object,
bool endTransaction, bool endTransaction,
unsigned int type = castor::OBJ_INVALID) unsigned int type = castor::OBJ_INVALID)
throw (castor::exception::Exception) = 0; = 0;
/** /**
* create foreign representations from a set of C++ Object * create foreign representations from a set of C++ Object
...@@ -94,7 +94,7 @@ namespace castor { ...@@ -94,7 +94,7 @@ namespace castor {
std::vector<IObject*> &objects, std::vector<IObject*> &objects,
bool endTransaction, bool endTransaction,
unsigned int type = castor::OBJ_INVALID) unsigned int type = castor::OBJ_INVALID)
throw (castor::exception::Exception) = 0; = 0;
/** /**
* Updates foreign representation from a C++ Object. * Updates foreign representation from a C++ Object.
...@@ -108,7 +108,7 @@ namespace castor { ...@@ -108,7 +108,7 @@ namespace castor {
virtual void updateRep(IAddress* address, virtual void updateRep(IAddress* address,
IObject* object, IObject* object,
bool endTransaction) bool endTransaction)
throw (castor::exception::Exception) = 0; = 0;
/** /**
* Deletes foreign representation of a C++ Object. * Deletes foreign representation of a C++ Object.
...@@ -122,7 +122,7 @@ namespace castor { ...@@ -122,7 +122,7 @@ namespace castor {
virtual void deleteRep(castor::IAddress* address, virtual void deleteRep(castor::IAddress* address,
castor::IObject* object, castor::IObject* object,
bool endTransaction = true) bool endTransaction = true)
throw (castor::exception::Exception) = 0; = 0;
/** /**
* create C++ object from foreign representation * create C++ object from foreign representation
...@@ -134,7 +134,7 @@ namespace castor { ...@@ -134,7 +134,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual IObject* createObj (IAddress* address) virtual IObject* createObj (IAddress* address)
throw (castor::exception::Exception) = 0; = 0;
/** /**
* create C++ objects from foreign representations * create C++ objects from foreign representations
...@@ -146,7 +146,7 @@ namespace castor { ...@@ -146,7 +146,7 @@ namespace castor {
* @exception Exception throws an Exception in case of error * @exception Exception throws an Exception in case of error
*/ */
virtual std::vector<IObject*> bulkCreateObj(IAddress* address) virtual std::vector<IObject*> bulkCreateObj(IAddress* address)
throw (castor::exception::Exception) = 0; = 0;
/** /**