1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

bug #1354: Handle exception when trying to connect to the marketplace

This commit is contained in:
Daniel Molina 2012-07-12 15:39:54 +02:00
parent ba144487ed
commit d5036967d4

View File

@ -113,6 +113,12 @@ module CloudClient
str << "Server: #{url.host}:#{url.port}"
return CloudClient::Error.new(str,"504")
rescue SocketError => e
str = "Error timeout while connected to server (#{e.to_s}).\n"
return CloudClient::Error.new(str,"503")
rescue
return CloudClient::Error.new($!.to_s,"503")
end
if res.is_a?(Net::HTTPSuccess)