Hi All,

I am trying to do error handling in vagrant file. 

My use case :
1. Bring up  VMs on openstack. (Using Vagrant openstack plugin)
2. Bring up  VMs on Virtual box.

Bringing up VM's happened smoothly. If i have to handle some error 
scenarios like,  resource stack on openstack or virtual box throwing some 
errors.

Is it possible ?

I have tried using begin rescue blocks. following was observed
1.  In case of any exceptions control didnot go to rescue blocks. 
2.  Is there any status code or message which can be interpreted in Vagrant 
file and some proper error message or handling can be done.
3.  If  manually syntax error is induced then control comes in rescue block

begin

config.vm.provider "openstack" do |os, override|
end  
rescue

## some handling or raising custom exception
end


Please correct me if my approach is wrong and do suggest any other ways to 
handle the error  scenarios.

Thanks
Rohit 



-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/634b58ef-2bfa-493e-82aa-cbd74c0e9fe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to