Remove dynamic exceptions
[anna.git] / source / comm / Service.cpp
index ce86dbe..80c64a8 100644 (file)
@@ -18,7 +18,7 @@ using namespace std;
 using namespace anna;
 
 void comm::Service::attach(comm::Server* server)
-throw(RuntimeException) {
+noexcept(false) {
   LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Service", "attach", ANNA_FILE_LOCATION));
   comm::Delivery::add(server);
   server->attach(this);
@@ -28,7 +28,7 @@ throw(RuntimeException) {
 // (1) Cuando no queda ningun recurso disponible se devuelve una excepcion
 //----------------------------------------------------------------------------------
 comm::Server* comm::Service::send(comm::Message& message)
-throw(RuntimeException) {
+noexcept(false) {
   LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Service", "send", ANNA_FILE_LOCATION));
   comm::Server* tryServer = NULL;
   comm::Server* init = NULL;
@@ -63,7 +63,7 @@ throw(RuntimeException) {
 }
 
 comm::Server* comm::Service::send(comm::Message* message)
-throw(RuntimeException) {
+noexcept(false) {
   if(message == NULL)
     throw RuntimeException("comm::Service::send | Cannot send a NULL message", ANNA_FILE_LOCATION);
 
@@ -71,7 +71,7 @@ throw(RuntimeException) {
 }
 
 int comm::Service::broadcast(comm::Message& message)
-throw() {
+{
   using namespace anna::comm;
   int result = 0;
 
@@ -94,7 +94,7 @@ throw() {
 }
 
 int comm::Service::broadcast(comm::Message* message)
-throw() {
+{
   if(message == NULL) {
     Logger::write(Logger::Error, "comm::Service::broadcast | Cannot broadcast a NULL message", ANNA_FILE_LOCATION);
     return 0;
@@ -104,7 +104,7 @@ throw() {
 }
 
 string comm::Service::asString() const
-throw() {
+{
   string result("comm::Service { ");
   result += Delivery::asString();
   result += " | Critical: ";
@@ -113,7 +113,7 @@ throw() {
 }
 
 xml::Node* comm::Service::asXML(xml::Node* parent) const
-throw() {
+{
   xml::Node* service = parent->createChild("comm.Service");
   Delivery::asXML(service);
   service->createAttribute("Critical", functions::asString(a_isCritical));
@@ -122,13 +122,13 @@ throw() {
 
 /*static*/
 comm::Server* comm::Service::server(comm::Delivery::iterator& ii)
-throw() {
+{
   return static_cast <Server*>(Delivery::resource(ii));
 }
 
 /*static*/
 const comm::Server* comm::Service::server(comm::Delivery::const_iterator& ii)
-throw() {
+{
   return static_cast <const Server*>(Delivery::resource(ii));
 }