Use raise instead of fail in rescue statements
This commit is contained in:
parent
ac8b115d0f
commit
797a757469
@ -24,7 +24,7 @@ module Producer
|
||||
def [](*args)
|
||||
@registry.fetch *args
|
||||
rescue KeyError
|
||||
fail RegistryKeyError, args.first.inspect
|
||||
raise RegistryKeyError, args.first.inspect
|
||||
end
|
||||
alias get []
|
||||
|
||||
|
@ -8,7 +8,7 @@ module Producer
|
||||
begin
|
||||
Recipe.new(env).tap { |o| o.instance_eval content, file_path }
|
||||
rescue Exception => e
|
||||
fail RecipeEvaluationError, e.message, [
|
||||
raise RecipeEvaluationError, e.message, [
|
||||
'%s (recipe)' % file_path,
|
||||
*e.backtrace
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user