Remove dynamic exceptions
[anna.git] / source / comm / Server.cpp
index 1869910..9be5fcc 100644 (file)
@@ -66,7 +66,7 @@ comm::Server::~Server() {
  * orden que el usado en el Server::connect.
  */
 void comm::Server::reset()
-throw(RuntimeException) {
+noexcept(false) {
 // La SSCC se establece en el método que invoca a éste
 //   Guard guard (*this, "comm::Server::reset");
   if(a_clientSocket == NULL)
@@ -78,7 +78,7 @@ throw(RuntimeException) {
 }
 
 void comm::Server::setReceiverFactory(comm::ReceiverFactory& receiverFactory)
-throw() {
+{
   a_receiverFactory = &receiverFactory;
 
   if(a_clientSocket != NULL)
@@ -128,7 +128,7 @@ throw() {
 
 */
 void comm::Server::connect()
-throw(RuntimeException) {
+noexcept(false) {
   LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Server", "connect", ANNA_FILE_LOCATION));
   Communicator* communicator = functions::component <Communicator> (ANNA_FILE_LOCATION);
   /*
@@ -195,7 +195,7 @@ throw(RuntimeException) {
 // se intenta usar => se intenta volver a conectar antes de dar el fallo.
 //---------------------------------------------------------------------------------------
 comm::ClientSocket* comm::Server::send(Message& message)
-throw(RuntimeException) {
+noexcept(false) {
   LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Server", "send", ANNA_FILE_LOCATION));
   Guard guard(*this, "comm::Server::send");
   const bool available = isAvailable();
@@ -215,32 +215,32 @@ throw(RuntimeException) {
 }
 
 comm::ClientSocket* comm::Server::send(Message* message)
-throw(RuntimeException) {
+noexcept(false) {
   if(message == NULL)
     throw RuntimeException("anna::comm::Server::send | Cannot send a NULL message", ANNA_FILE_LOCATION);
 
   return send(*message);
 }
 
-void comm::Server::setAutoRecovery(bool autoRecovery) throw() {
+void comm::Server::setAutoRecovery(bool autoRecovery) {
   bool* ar = const_cast <bool*>(&a_autoRecovery);
   *ar = autoRecovery;
 }
 
 bool comm::Server::isAvailable() const
-throw(RuntimeException) {
+noexcept(false) {
 //   Guard guard (*this, "comm::Server::isAvailable");
   return (a_clientSocket == NULL) ? false : (a_clientSocket->isConnected() && (a_clientSocket->isClosedPending() == false));
 }
 
 //  Este metodo sea re-escrito en commsec::Server::allocateClientSocket para devolver un commsec::RemoteConnection
 comm::ClientSocket* comm::Server::allocateClientSocket(const comm::INetAddress& in, comm::TransportFactory* transportFactory) const
-throw() {
+{
   return new ClientSocket(in, transportFactory);
 }
 
 string comm::Server::asString() const
-throw() {
+{
   string result("comm::Server { ");
   result += Resource::asString();
   result += " |  Sequence: ";
@@ -260,7 +260,7 @@ throw() {
 }
 
 xml::Node* comm::Server::asXML(xml::Node* parent) const
-throw(RuntimeException) {
+noexcept(false) {
   xml::Node* result = parent->createChild("comm.Server");
   result->createAttribute("Host", a_host.getName());
   result->createAttribute("Sequence", a_sequence);