Remove error handling for evaluation errors
This commit is contained in:
@@ -12,15 +12,7 @@ module Producer
|
||||
|
||||
def run!
|
||||
check_arguments!
|
||||
begin
|
||||
recipe.evaluate env
|
||||
rescue RecipeEvaluationError => e
|
||||
backtrace = e.backtrace.reject { |l| l =~ /\/producer-core\// }
|
||||
@stdout.puts [backtrace.shift, e.message].join ': '
|
||||
@stdout.puts backtrace
|
||||
|
||||
exit 70
|
||||
end
|
||||
recipe.evaluate(env)
|
||||
worker.process recipe.tasks
|
||||
end
|
||||
|
||||
|
@@ -2,8 +2,6 @@ module Producer
|
||||
module Core
|
||||
Error = Class.new(StandardError)
|
||||
ConditionNotMetError = Class.new(Error)
|
||||
RecipeEvaluationError = Class.new(StandardError)
|
||||
TaskEvaluationError = Class.new(RecipeEvaluationError)
|
||||
RemoteCommandExecutionError = Class.new(Error)
|
||||
end
|
||||
end
|
||||
|
@@ -18,10 +18,6 @@ module Producer
|
||||
instance_eval &@block
|
||||
end
|
||||
self
|
||||
rescue NameError => e
|
||||
raise RecipeEvaluationError,
|
||||
"invalid recipe keyword `#{e.name}'",
|
||||
e.backtrace
|
||||
end
|
||||
|
||||
private
|
||||
|
@@ -23,10 +23,6 @@ module Producer
|
||||
@env = env
|
||||
instance_eval &@block
|
||||
rescue ConditionNotMetError
|
||||
rescue NameError => e
|
||||
raise TaskEvaluationError,
|
||||
"invalid task action `#{e.name}'",
|
||||
e.backtrace
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user