X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/ffc9f02ea0544d4b1aa86e29afe12a2b4bace953..d61490999af17b602d7208ada92840cddc4eff6a:/Server/src/response.cpp diff --git a/Server/src/response.cpp b/Server/src/response.cpp index b39aaea..91b44af 100644 --- a/Server/src/response.cpp +++ b/Server/src/response.cpp @@ -69,23 +69,14 @@ Response::Response(const string& body, const string& desc, const Code& code): } istream& operator>>(istream& is, Response& resp) - /*throw (HTTPResponse::Error, ios::failure, sockerr)*/ { + throw (HTTPResponse::Error, ios::failure, sockerr, + xmlpp::parse_error) { #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" << ": operator>>()" << endl; #endif // DEBUG is >> static_cast(resp); if (resp.get_body().length()) { - // TODO parseo XML del body para buscar las cosas basicas de la respuesta. - Response::Parser parser(resp); - try { - parser.parse_memory(resp.get_body()); - } catch (const xmlpp::parse_error& e) { - // TODO - ver gravedad. -#ifdef DEBUG - cerr << __FILE__ << "(" << __LINE__ << ")" - << " : operator>>() error de parseo: " << e.what() << endl; -#endif // DEBUG - } + Response::Parser(resp).parse_memory(resp.get_body()); } return is; }