X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/1219cbffa9b305ac8ed53e2bb333443ea3bb1a75..HEAD:/Server/src/controlserver.cpp?ds=inline diff --git a/Server/src/controlserver.cpp b/Server/src/controlserver.cpp index 966e362..a8baf50 100644 --- a/Server/src/controlserver.cpp +++ b/Server/src/controlserver.cpp @@ -96,7 +96,19 @@ void ControlServer::real_run(void) throw() { } void ControlServer::send(const Response& response) { - socket << response << flush; + try { + socket << response << flush; + } catch (const sockerr& e) { + cerr << __FILE__ << "(" << __LINE__ << ") send(): " + << "Socket Error: " << e.operation() << " | serrno = " + << e.serrno() << " | errstr = " << e.errstr() << endl; + } catch (const exception& e) { + cerr << __FILE__ << "(" << __LINE__ << ") send(): " + << "Error: " << e.what() << endl; + } catch (...) { + cerr << __FILE__ << "(" << __LINE__ << ") send(): " + << "Error DESCONOCIDO!!!!!!!!" << endl; + } #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" << ": send() Enviado!" << endl;