instance method
subscribe
Ruby on Rails 7.0.10
Since v7.0.10Signature
subscribe(subscriber)
Register a new error subscriber. The subscriber must respond to
report(Exception, handled: Boolean, context: Hash)
The report method should never raise an error.
Parameters
-
subscriberreq
Source
# File activesupport/lib/active_support/error_reporter.rb, line 76
def subscribe(subscriber)
unless subscriber.respond_to?(:report)
raise ArgumentError, "Error subscribers must respond to #report"
end
@subscribers << subscriber
end
Defined in activesupport/lib/active_support/error_reporter.rb line 76
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::ErrorReporter