X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fhttp%2Fecho%2Fmain.cpp;fp=example%2Fhttp%2Fecho%2Fmain.cpp;h=0ceea9f733266cd2fe271e450283e6dd7e28dd1c;hp=06f6ee56b1619db62cb999c7e425e077de20b229;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/example/http/echo/main.cpp b/example/http/echo/main.cpp index 06f6ee5..0ceea9f 100644 --- a/example/http/echo/main.cpp +++ b/example/http/echo/main.cpp @@ -30,27 +30,27 @@ public: a_httpResponse.createHeader (http::Header::Type::Server)->setValue (anna_use_sccs_tag (http)); } - void setNotSend (const bool notSend) throw () { a_notSend = notSend; } + void setNotSend (const bool notSend) { a_notSend = notSend; } private: http::Response a_httpResponse; bool a_notSend; - void evRequest (ClientSocket&, const http::Request& request) throw (RuntimeException); - void evResponse (ClientSocket&, const http::Response&) throw (RuntimeException) {;} + void evRequest (ClientSocket&, const http::Request& request) noexcept(false); + void evResponse (ClientSocket&, const http::Response&) noexcept(false) {;} }; class MyCommunicator : public comm::Communicator { public: MyCommunicator () {;} - void setNotSend (const bool notSend) throw () { a_httpHandler.setNotSend (notSend); } + void setNotSend (const bool notSend) { a_httpHandler.setNotSend (notSend); } private: MyHandler a_httpHandler; void eventReceiveMessage (comm::ClientSocket &, const Message& message) - throw (RuntimeException); + noexcept(false); }; class HTTPArithmeticServer : public comm::Application { @@ -61,8 +61,8 @@ private: MyCommunicator a_communicator; comm::ServerSocket* a_serverSocket; - void initialize () throw (RuntimeException); - void run () throw (RuntimeException); + void initialize () noexcept(false); + void run () noexcept(false); }; using namespace std; @@ -105,7 +105,7 @@ HTTPArithmeticServer::HTTPArithmeticServer () : } void HTTPArithmeticServer::initialize () - throw (RuntimeException) + noexcept(false) { CommandLine& cl (CommandLine::instantiate ()); @@ -118,14 +118,14 @@ void HTTPArithmeticServer::initialize () } void HTTPArithmeticServer::run () - throw (RuntimeException) + noexcept(false) { a_communicator.attach (a_serverSocket); a_communicator.accept (); } void MyCommunicator::eventReceiveMessage (ClientSocket& clientSocket, const Message& message) - throw (RuntimeException) + noexcept(false) { LOGMETHOD (TraceMethod tm ("MyCommunicator", "eventReceiveMessage", ANNA_FILE_LOCATION)); @@ -148,7 +148,7 @@ void MyCommunicator::eventReceiveMessage (ClientSocket& clientSocket, const Mess } void MyHandler::evRequest (ClientSocket& clientSocket, const http::Request& request) - throw (RuntimeException) + noexcept(false) { const DataBlock& body = request.getBody ();