Remove dynamic exceptions
[anna.git] / example / ldap / tSearch / main.cpp
index 6799176..00ed541 100644 (file)
@@ -24,7 +24,7 @@
 #include <anna/ldap/Attribute.hpp>
 
 class MySession : public ldap::Session {
-   void eventResponse (const ldap::Response&) throw (RuntimeException);
+   void eventResponse (const ldap::Response&) noexcept(false);
 };
 
 class MyEngine : public ldap::Engine {
@@ -34,9 +34,9 @@ public:
 private:
    Recycler<MySession> a_sessions;
 
-   ldap::Session* allocateSession (const int category) throw () { return a_sessions.create (); }
+   ldap::Session* allocateSession (const int category) { return a_sessions.create (); }
 
-   void releaseSession (ldap::Session* session) throw () 
+   void releaseSession (ldap::Session* session) { 
       MySession* aux = static_cast <MySession*> (session);
       a_sessions.release (aux);
    }
@@ -57,26 +57,26 @@ public:
    MyCommunicator () : comm::Communicator () { ;}
 
 private:
-   void eventReceiveMessage (comm::ClientSocket &, const comm::Message&) throw (RuntimeException) {;}
+   void eventReceiveMessage (comm::ClientSocket &, const comm::Message&) noexcept(false) {;}
 };
 
 class Buddy : public Clock {
 public:
    Buddy () :  Clock ("buddy", (Millisecond)2000) {;}
    
-   void setLDAPEngine (ldap::Engine& ldapEngine) throw () { a_ldapEngine = &ldapEngine;  }
+   void setLDAPEngine (ldap::Engine& ldapEngine) { a_ldapEngine = &ldapEngine;  }
    
 private:
    ldap::Engine* a_ldapEngine;   
    ldap::Search a_ldapSearch;
    
-   bool tick () throw (RuntimeException);
+   bool tick () noexcept(false);
 };
 
 class Stopper : public Timer {
 public:
    Stopper () :  Timer ("stopper", (Millisecond)0) {;}
-   void expire (Engine*) throw (RuntimeException);      
+   void expire (Engine*) noexcept(false);      
 };
 
 class LDAPClient : public anna::comm::Application {
@@ -90,7 +90,7 @@ private:
    Buddy a_buddy;
    Stopper a_stopper;  
 
-   void run () throw (RuntimeException);    
+   void run () noexcept(false);    
 };
 
 using namespace std;
@@ -141,7 +141,7 @@ LDAPClient::LDAPClient () :
 // (1) Para evitar la ejecucion de la aplicacion en caso de indicar un valor no valido.
 //-----------------------------------------------------------------------------------------
 void LDAPClient::run ()
-   throw (RuntimeException)
+   noexcept(false)
 {
    LOGMETHOD (TraceMethod tm ("LDAPClient", "run", ANNA_FILE_LOCATION));
 
@@ -168,7 +168,7 @@ void LDAPClient::run ()
 }
 
 void MySession::eventResponse (const ldap::Response& response) 
-   throw (RuntimeException)
+   noexcept(false)
 {
    cout << "LDAP Response: " << response.asString () << endl;
    cout << "   Name: " << response.getName () << endl;   
@@ -194,7 +194,7 @@ void MySession::eventResponse (const ldap::Response& response)
 }
 
 bool Buddy::tick () 
-   throw (RuntimeException
+   noexcept(false
 {
    CommandLine& cl = CommandLine::instantiate ();
 
@@ -222,7 +222,7 @@ bool Buddy::tick ()
 }
 
 void Stopper::expire (Engine*) 
-   throw (RuntimeException)
+   noexcept(false)
 {
    LOGMETHOD (TraceMethod tm ("Stopper", "expire", ANNA_FILE_LOCATION));