Don't catch unknown exceptions if we are only going to rethrow them.
[libt2n] / src / command_server.cpp
index 2bb6521..1db24a4 100644 (file)
@@ -102,8 +102,6 @@ void command_server::handle_packet(const std::string& packet, server_connection*
                "code " << e.code << " (" << e.what() << ")";
         res.set_exception(new t2n_serialization_error(msg.str()));
     }
-    catch(...)
-        { throw; }
 
     if (!res.has_exception())
     {
@@ -125,8 +123,6 @@ void command_server::handle_packet(const std::string& packet, server_connection*
             }
             catch (t2n_exception &e)
                 { res.set_exception(e.clone()); }
-            catch (...)
-                { throw; }
         }
         else
         {
@@ -154,8 +150,6 @@ void command_server::handle_packet(const std::string& packet, server_connection*
         res.set_exception(new t2n_serialization_error(msg.str()));
         oa << res;
     }
-    catch(...)
-        { throw; }
 
     std::ostream* ostr;
     if ((ostr=s.get_logstream(fulldebug))!=NULL)
@@ -196,8 +190,6 @@ void command_server::handle(long long usec_timeout, long long* usec_timeout_rema
                     // shut down a connection with transfer errors (usually write errors)
                     conn->close();
                 }
-                catch(...)
-                    { throw; }
             }
         }
     }