Skip to content

Commit

Permalink
add exceptions rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
npauzenga committed Jan 19, 2016
1 parent 095719d commit 2d703fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/tasks/exceptions.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace :exceptions do
task :list => :environment do
exceptions = []
ObjectSpace.each_object(Class) do |k|
exceptions << k if k.ancestors.include?(Exception)
end

puts exceptions.sort { |a,b| a.to_s <=> b.to_s }.join("\n")
end
end

0 comments on commit 2d703fb

Please sign in to comment.