Remove dynamic exceptions
[anna.git] / include / anna / comm / ByRangeDelivery.hpp
index de9727f..0895029 100644 (file)
@@ -57,7 +57,7 @@ protected:
       delivery = new TDelivery(name.c_str(), false);
     }
 
-    std::string asString() const throw() {
+    std::string asString() const {
       std::string result("comm::ByRangeDelivery { Bottom: ");
       result += TSerializer::asString(bottom);
       result += " | Top: ";
@@ -67,7 +67,7 @@ protected:
       return result += " }";
     }
 
-    xml::Node* asXML(xml::Node* parent) const throw() {
+    xml::Node* asXML(xml::Node* parent) const {
       xml::Node* result = parent->createChild("comm.Range");
       result->createAttribute("Bottom", TSerializer::asString(bottom));
       result->createAttribute("Top", TSerializer::asString(top));
@@ -112,7 +112,7 @@ public:
      \return La instancia del servicio de reparto asociado a este rango.
   */
   range_iterator createRange(const TKey& bottom, const TKey& top)
-  throw(RuntimeException) {
+  noexcept(false) {
     Range* result;
 
     if(bottom > top) {
@@ -150,7 +150,7 @@ public:
      \param ii Iterador de rango al que asociar el servicio. Debe ser resultado de invocar a #createRange.
      \param server Instancia del comm::Server a incorporar dentro del rango.
   */
-  void attach(range_iterator& ii, Server* server) throw(RuntimeException) {
+  void attach(range_iterator& ii, Server* server) noexcept(false) {
     range(ii)->delivery->attach(server);
     comm::Service::attach(server);
   }
@@ -160,7 +160,7 @@ public:
      \param key Clave usada para calcular el reparto.
      \warning Este metodo debe invocarse siempre antes de usar este servicio de reparto.
   */
-  void prepare(const TKey& key) throw(RuntimeException) {
+  void prepare(const TKey& key) noexcept(false) {
     Range* w = find(key);
 
     if(w == NULL && Logger::isActive(Logger::Warning)) {
@@ -182,7 +182,7 @@ public:
   }
 
   std::string asString() const
-  throw() {
+  {
     std::string result = className();
     result += " { ";
     result += comm::Delivery::asString();
@@ -197,7 +197,7 @@ public:
   }
 
   xml::Node* asXML(xml::Node* parent) const
-  throw() {
+  {
     xml::Node* result = parent->createChild("anna.comm.ByRangeDelivery");
     xml::Node* node = comm::Service::asXML(result);
 
@@ -213,20 +213,20 @@ public:
      a los que pertenece la clase.
      \return Una cadena con el nombre de este selector.
   */
-  static const char* className() throw() { return "anna::comm::ByRangeDelivery"; }
+  static const char* className() { return "anna::comm::ByRangeDelivery"; }
 
 protected:
-  range_iterator range_begin() throw() { return a_ranges.begin(); }
-  range_iterator range_end() throw() { return a_ranges.end(); }
+  range_iterator range_begin() { return a_ranges.begin(); }
+  range_iterator range_end() { return a_ranges.end(); }
 
-  const_range_iterator range_begin() const throw() { return a_ranges.begin(); }
-  const_range_iterator range_end() const throw() { return a_ranges.end(); }
+  const_range_iterator range_begin() const { return a_ranges.begin(); }
+  const_range_iterator range_end() const { return a_ranges.end(); }
 
-  static Range* range(range_iterator& ii) throw() { return *ii; }
-  static const Range* range(const_range_iterator& ii) throw() { return *ii; }
+  static Range* range(range_iterator& ii) { return *ii; }
+  static const Range* range(const_range_iterator& ii) { return *ii; }
 
   virtual void do_initialize()
-  throw(RuntimeException) {
+  noexcept(false) {
     for(range_iterator ii = range_begin(), maxii = range_end(); ii != maxii; ii ++)
       range(ii)->delivery->initialize();
   }
@@ -235,7 +235,7 @@ private:
   range_container a_ranges;
   Range* a_currentRange;
 
-  Range* find(const TKey& key) throw() {
+  Range* find(const TKey& key) {
     Range* result(NULL);
     Range* w;
 
@@ -252,7 +252,7 @@ private:
   }
 
   comm::Resource* do_apply()
-  throw(RuntimeException) {
+  noexcept(false) {
     if(a_currentRange == NULL) {
       std::string msg(asString());
       msg += " | Wrong call to anna::comm::ByRangeDelivery::prepare";
@@ -264,7 +264,7 @@ private:
 
   // Considera que el servicio esta NO-disponible cuando TODOS los servicios fallan
   bool do_fault(const comm::Resource* resource)
-  throw() {
+  {
     int n, nfault;
     n = nfault = 0;
 
@@ -280,7 +280,7 @@ private:
 
   // Considera que el servicio esta recuperado cuando alguno de los servicios esta disponible
   bool do_recover(const comm::Resource* resource)
-  throw() {
+  {
     bool result(false);
 
     for(range_iterator ii = range_begin(), maxii = range_end(); ii != maxii; ii ++) {