summaryrefslogtreecommitdiff
path: root/lib/chef/run_context/cookbook_compiler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/run_context/cookbook_compiler.rb')
-rw-r--r--lib/chef/run_context/cookbook_compiler.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/chef/run_context/cookbook_compiler.rb b/lib/chef/run_context/cookbook_compiler.rb
index 9d8ea87360..35389931bf 100644
--- a/lib/chef/run_context/cookbook_compiler.rb
+++ b/lib/chef/run_context/cookbook_compiler.rb
@@ -169,17 +169,17 @@ class Chef
def compile_recipes
@events.recipe_load_start(run_list_expansion.recipes.size)
run_list_expansion.recipes.each do |recipe|
- begin
- path = resolve_recipe(recipe)
- @run_context.load_recipe(recipe)
- @events.recipe_file_loaded(path, recipe)
- rescue Chef::Exceptions::RecipeNotFound => e
- @events.recipe_not_found(e)
- raise
- rescue Exception => e
- @events.recipe_file_load_failed(path, e, recipe)
- raise
- end
+
+ path = resolve_recipe(recipe)
+ @run_context.load_recipe(recipe)
+ @events.recipe_file_loaded(path, recipe)
+ rescue Chef::Exceptions::RecipeNotFound => e
+ @events.recipe_not_found(e)
+ raise
+ rescue Exception => e
+ @events.recipe_file_load_failed(path, e, recipe)
+ raise
+
end
@events.recipe_load_complete
end
@@ -231,14 +231,14 @@ class Chef
def load_libraries_from_cookbook(cookbook_name, globs = "**/*.rb")
each_file_in_cookbook_by_segment(cookbook_name, :libraries, globs) do |filename|
- begin
- logger.trace("Loading cookbook #{cookbook_name}'s library file: #{filename}")
- Kernel.require(filename)
- @events.library_file_loaded(filename)
- rescue Exception => e
- @events.library_file_load_failed(filename, e)
- raise
- end
+
+ logger.trace("Loading cookbook #{cookbook_name}'s library file: #{filename}")
+ Kernel.require(filename)
+ @events.library_file_loaded(filename)
+ rescue Exception => e
+ @events.library_file_load_failed(filename, e)
+ raise
+
end
end