Improve CLI error reporting

This commit is contained in:
Thibault Jouan
2014-10-12 18:11:37 +00:00
parent f6237bfc0c
commit 25d03d4322
8 changed files with 142 additions and 7 deletions
+3 -2
View File
@@ -17,8 +17,9 @@ module Producer
rescue ArgumentError => e
stderr.puts e.message
exit EX_USAGE
rescue RuntimeError => e
stderr.puts "#{e.class.name.split('::').last}: #{e.message}"
rescue Exception => e
ef = ErrorFormatter.new(force_cause: [RecipeEvaluationError])
stderr.puts ef.format e
exit EX_SOFTWARE
end
end