diff options
author | danielsdeleo <dan@opscode.com> | 2014-01-22 16:05:32 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2014-01-22 16:05:32 -0800 |
commit | c52960f3cea72c65068ab07cdeea602b4821d322 (patch) | |
tree | 8b4b70235316b321f08b5b925353e900dda3ac8f /lib/chef/policy_builder | |
parent | 25e2afe01d5e9d3e156c90f0a923906582a70f3e (diff) | |
download | chef-c52960f3cea72c65068ab07cdeea602b4821d322.tar.gz |
Update error messaging in Policyfile policy builder
Diffstat (limited to 'lib/chef/policy_builder')
-rw-r--r-- | lib/chef/policy_builder/policyfile.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index 9460302edc..9a544e6dc9 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -218,6 +218,8 @@ class Chef def policy @policy ||= http_api.get(policyfile_location) + rescue Net::HTTPServerException => e + raise ConfigurationError, "Error loading policyfile from `#{policyfile_location}': #{e.class} - #{e.message}" end def policyfile_location @@ -310,6 +312,9 @@ class Chef @api_service ||= Chef::REST.new(config[:chef_server_url]) end + def config + Chef::Config + end end end |