mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-16 01:33:10 +09:00
Feature #2665: RMProxy logs the proxied method, and manages connection errors
This commit is contained in:
1 parent
6518290119
commit
3e4fcf369e
1 file changed
+11
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user