1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Check if exception has a #response method before calling it, otherwise call #message

This commit is contained in:
Manuel Meurer 2012-03-12 17:47:21 +01:00
parent c5a71c48c1
commit 845ae3f511

View file

@ -9,7 +9,7 @@ module Fog
response = begin
get_service
rescue => error
error.response
error.respond_to(:response) ? error.response : error.message
end
Fog::Time.now = Time.parse(response.headers['Date'])
end