From a8c7ad30eebd7cfbe8dec0a2b14b37444b717c36 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 31 Jan 2013 18:52:29 -0800 Subject: [PATCH] Be a bit more fine grained about errors that are reported for Vfiles --- lib/vagrant/config/loader.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vagrant/config/loader.rb b/lib/vagrant/config/loader.rb index 41237e46a..49bfc760d 100644 --- a/lib/vagrant/config/loader.rb +++ b/lib/vagrant/config/loader.rb @@ -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"))