class method self.error

Ruby on Rails 7.2.3

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.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)
Source
# File railties/lib/rails.rb, line 93
    def error
      ActiveSupport.error_reporter
    end

Defined in railties/lib/rails.rb line 93 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails

Type at least 2 characters to search.

↑↓ navigate · open · esc close