Method: ActiveSupport::ErrorReporter#subscribe
- Defined in:
- lib/active_support/error_reporter.rb
#subscribe(subscriber) ⇒ Object
Register a new error subscriber. The subscriber must respond to
report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String)
The report method should never raise an error.
162 163 164 165 166 167 |
# File 'lib/active_support/error_reporter.rb', line 162 def subscribe(subscriber) unless subscriber.respond_to?(:report) raise ArgumentError, "Error subscribers must respond to #report" end @subscribers << subscriber end |