How can I handle errors in Vagrantfile?

34 Views Asked by At

I have this code in Vagrantfile:

begin
   ...
   vb.customize ... my Ruby code goes here
   ...
rescue
   puts "my error message goes here in case of Ruby error"
end        
# Ruby code below should be executed even in case of error, however instead it exits
... never executed in case of error

I was hoping that standard Ruby error handling block will work here. What am I missing?

0

There are 0 best solutions below