From 3e4fcf369e17ee55e4fb2d5376ddafe51037fd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Mon, 27 Jan 2014 18:42:45 +0100 Subject: [PATCH] Feature #2665: RMProxy logs the proxied method, and manages connection errors --- src/rm/RequestManagerProxy.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/rm/RequestManagerProxy.cc b/src/rm/RequestManagerProxy.cc index a8c55a86a1..256be44262 100644 --- a/src/rm/RequestManagerProxy.cc +++ b/src/rm/RequestManagerProxy.cc @@ -33,6 +33,8 @@ RequestManagerProxy::RequestManagerProxy(string _method) method = _method; client = new Client("none", master_endpoint, msg_size); + + method_name = ("Proxy - " + method); } /* -------------------------------------------------------------------------- */ @@ -51,7 +53,14 @@ void RequestManagerProxy::request_execute(xmlrpc_c::paramList const& _paramList, { xmlrpc_c::value return_value; - client->call(client->get_endpoint(), method, _paramList, &return_value); + try + { + client->call(client->get_endpoint(), method, _paramList, &return_value); - *(att.retval) = return_value; + *(att.retval) = return_value; + } + catch(exception const& e) + { + failure_response(INTERNAL, request_error("Could not connect to the federation master oned", ""), att); + } }