Rescue more specific exceptions in recipe evaluator

This commit is contained in:
Thibault Jouan 2015-05-12 18:53:17 +00:00
parent 93878ebb6b
commit 2253788d64

View File

@ -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