error()
Returns the ActiveSupport::ErrorReporter of the current Rails project, otherwise it returns nil if there is no project.
Rails.error.handle(IOError) do # ... end Rails.error.report(error)
# File railties/lib/rails.rb, line 90 def error ActiveSupport.error_reporter end