X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FServer.cc;h=4e37e68c403709ed6e4bbbf92b53716ccfeba385;hb=9c0078ac0054789badff2a987364ed0448b080ef;hp=83f35b2aa6d15665ad2d12134aa386c2268c71b8;hpb=70905bebad1f8c394fceb3a5d2a493eeecf3bd13;p=senf.git diff --git a/Console/Server.cc b/Console/Server.cc index 83f35b2..4e37e68 100644 --- a/Console/Server.cc +++ b/Console/Server.cc @@ -126,11 +126,6 @@ prefix_ void senf::console::Client::clientData(ReadHelper::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::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::dispatch( handle_, 16384u, ReadUntil("\n"),