Method: Vagrant::Action::Warden#begin_rescue

Defined in:
lib/vagrant/action/warden.rb

#begin_rescue(env) ⇒ Object

Begins the recovery sequence for all middlewares which have run. It does this by calling recover (if it exists) on each middleware which has already run, in reverse order.



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/vagrant/action/warden.rb', line 53

def begin_rescue(env)
  @stack.each do |act|
    if act.respond_to?(:recover)
      @logger.info("Calling recover: #{act}")
      act.recover(env)
    end
  end

  # Clear stack so that warden down the middleware chain doesn't
  # rescue again.
  @stack.clear
end