From 2253788d64d8021e4af704df41b46949fbc1ace1 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Tue, 12 May 2015 18:53:17 +0000 Subject: [PATCH] Rescue more specific exceptions in recipe evaluator --- lib/producer/core/recipe/file_evaluator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/producer/core/recipe/file_evaluator.rb b/lib/producer/core/recipe/file_evaluator.rb index be102e1..e598dae 100644 --- a/lib/producer/core/recipe/file_evaluator.rb +++ b/lib/producer/core/recipe/file_evaluator.rb @@ -7,7 +7,7 @@ module Producer content = File.read(file_path) begin Recipe.new(env).tap { |o| o.instance_eval content, file_path } - rescue Exception => e + rescue ::StandardError, ::ScriptError => e raise RecipeEvaluationError, e.message, [ '%s (recipe)' % file_path, *e.backtrace