module Rails

def error

Rails.error.report(error)
end
# ...
Rails.error.handle(IOError) do

otherwise it returns +nil+ if there is no project.
Returns the ActiveSupport::ErrorReporter of the current \Rails project,
def error
  ActiveSupport.error_reporter
end