Console: Implement ObjectDirectory proxy
[senf.git] / Console / Server.cc
index 83f35b2..4e37e68 100644 (file)
@@ -126,11 +126,6 @@ prefix_ void senf::console::Client::clientData(ReadHelper<ClientHandle>::ptr hel
         return;
     }
 
-    ///\fixme Fix Client::clientData implementation
-    /// Remove the 'dup' needed here so we don't close the same fd twice (see Client constructor)
-    /// Make output non-blocking
-    /// Don't register a new ReadHelper every round
-
     std::string data (tail_ + helper->data());
     tail_ = helper->tail();
     boost::trim(data); // Gets rid of superfluous  \r or \n characters
@@ -143,7 +138,13 @@ prefix_ void senf::console::Client::clientData(ReadHelper<ClientHandle>::ptr hel
         // THIS COMMITS SUICIDE. THE INSTANCE IS GONE AFTER stopClient RETURNS
         stopClient();
         return;
-    }        
+    }
+    catch (std::exception & ex) {
+        out_ << ex.what() << std::endl;
+    }
+    catch (...) {
+        out_ << "unidentified error (unknown exception thrown)" << std::endl;
+    }
 
     showPrompt();
     ReadHelper<ClientHandle>::dispatch( handle_, 16384u, ReadUntil("\n"),