X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FServer.cc;h=72fd25c36616f42e366a926b7515fd77f3a60ba6;hb=c0b5c560da72983939b286632ac481e076649ddb;hp=569a7cff32961119f1b90cf3b811cc1edda8f73b;hpb=5e9e6057a4e5c1241ff3f1b75b0f797eb570725d;p=senf.git diff --git a/Console/Server.cc b/Console/Server.cc index 569a7cf..72fd25c 100644 --- a/Console/Server.cc +++ b/Console/Server.cc @@ -126,10 +126,10 @@ prefix_ void senf::console::Client::clientData(ReadHelper::ptr hel return; } -# warning 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 + ///\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(); @@ -143,7 +143,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"),