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

raise error in Model#reload if the thing goes away

This commit is contained in:
geemus 2010-05-07 09:51:58 -07:00
parent c70fb49dac
commit 45cc1e5099

View file

@ -115,7 +115,10 @@ module Fog
def wait_for(timeout = 600, &block)
reload
Fog.wait_for(timeout) { reload && instance_eval(&block) }
Fog.wait_for(timeout) do
reload or raise StandardError.new("Reload failed, #{self.class} #{self.identity} went away.")
instance_eval(&block)
end
end
private