Remove dynamic exceptions
[anna.git] / example / http / echo / main.cpp
index 06f6ee5..0ceea9f 100644 (file)
@@ -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 ();