Improve error reporting during recipe evaluation

* Report invalid action usages from tasks;
* Implement backtrace cleaning in CLI;
* Extract error class declarations in a new errors file;
* Replace raise with fail keyword in task DSL class.
This commit is contained in:
Thibault Jouan
2013-08-01 17:15:11 +00:00
parent 836f9ffc29
commit c4fc9828db
10 changed files with 56 additions and 17 deletions

View File

@@ -18,9 +18,9 @@ module Producer
end
self
rescue NameError => e
err = RecipeEvaluationError.new("invalid recipe keyword `#{e.name}'")
err.set_backtrace e.backtrace.reject { |l| l =~ /\/producer-core\// }
raise err
raise RecipeEvaluationError,
"invalid recipe keyword `#{e.name}'",
e.backtrace
end
private