When verifying boxes, catch all exceptions

This commit is contained in:
Mitchell Hashimoto 2010-05-28 23:26:11 -07:00
parent 2af2a81eb8
commit ced200e256
2 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ module Vagrant
def verify_appliance def verify_appliance
# We now try to read the applince. If it succeeds, we return true. # We now try to read the applince. If it succeeds, we return true.
VirtualBox::Appliance.new(@runner.ovf_file) VirtualBox::Appliance.new(@runner.ovf_file)
rescue VirtualBox::Exceptions::FileErrorException rescue Exception
raise ActionException.new(:box_verification_failed) raise ActionException.new(:box_verification_failed)
end end
end end

View File

@ -166,6 +166,7 @@ Gem::Specification.new do |s|
"test/vagrant/provisioners/chef_solo_test.rb", "test/vagrant/provisioners/chef_solo_test.rb",
"test/vagrant/provisioners/chef_test.rb", "test/vagrant/provisioners/chef_test.rb",
"test/vagrant/resource_logger_test.rb", "test/vagrant/resource_logger_test.rb",
"test/vagrant/ssh_session_test.rb",
"test/vagrant/ssh_test.rb", "test/vagrant/ssh_test.rb",
"test/vagrant/systems/linux_test.rb", "test/vagrant/systems/linux_test.rb",
"test/vagrant/util/error_helper_test.rb", "test/vagrant/util/error_helper_test.rb",
@ -251,6 +252,7 @@ Gem::Specification.new do |s|
"test/vagrant/util/platform_test.rb", "test/vagrant/util/platform_test.rb",
"test/vagrant/util/error_helper_test.rb", "test/vagrant/util/error_helper_test.rb",
"test/vagrant/util/plain_logger_test.rb", "test/vagrant/util/plain_logger_test.rb",
"test/vagrant/ssh_session_test.rb",
"test/vagrant/ssh_test.rb" "test/vagrant/ssh_test.rb"
] ]