From 45cc1e5099f5b1e25444be227bb46b5069a93a3c Mon Sep 17 00:00:00 2001 From: geemus Date: Fri, 7 May 2010 09:51:58 -0700 Subject: [PATCH] raise error in Model#reload if the thing goes away --- lib/fog/model.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/fog/model.rb b/lib/fog/model.rb index 1ef07ec74..4301e1672 100644 --- a/lib/fog/model.rb +++ b/lib/fog/model.rb @@ -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