Be a bit more fine grained about errors that are reported for Vfiles

This commit is contained in:
Mitchell Hashimoto 2013-01-31 18:52:29 -08:00
parent 67c2e205be
commit a8c7ad30ee
1 changed files with 7 additions and 0 deletions

View File

@ -200,6 +200,13 @@ module Vagrant
rescue SyntaxError => e
# Report syntax errors in a nice way.
raise Errors::VagrantfileSyntaxError, :file => e.message
rescue SystemExit
# Continue raising that exception...
raise
rescue Vagrant::Errors::VagrantError
# Continue raising known Vagrant errors since they already
# contain well worded error messages and context.
raise
rescue Exception => e
@logger.error("Vagrantfile load error: #{e.message}")
@logger.error(e.backtrace.join("\n"))