X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fldap%2FtSearch%2Fmain.cpp;fp=example%2Fldap%2FtSearch%2Fmain.cpp;h=00ed54115462b4559d587ce9d440c502ddd5f573;hp=6799176bb5e12d2f3ba0aea7d072dc72bb3327e4;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/example/ldap/tSearch/main.cpp b/example/ldap/tSearch/main.cpp index 6799176..00ed541 100644 --- a/example/ldap/tSearch/main.cpp +++ b/example/ldap/tSearch/main.cpp @@ -24,7 +24,7 @@ #include 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 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 (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));