instance method
handle_unexpected_args
Ruby on Rails 8.1.2
Since v8.1.2 PrivateSignature
handle_unexpected_args(name_or_object, payload, kwargs)
No documentation comment.
Parameters
-
name_or_objectreq -
payloadreq -
kwargsreq
Source
# File activesupport/lib/active_support/event_reporter.rb, line 579
def handle_unexpected_args(name_or_object, payload, kwargs)
message = <<~MESSAGE
Rails.event.notify accepts either an event object, a payload hash, or keyword arguments.
Received: #{name_or_object.inspect}, #{payload.inspect}, #{kwargs.inspect}
MESSAGE
if raise_on_error?
raise ArgumentError, message
else
ActiveSupport.error_reporter.report(ArgumentError.new(message), handled: true)
end
end
Defined in activesupport/lib/active_support/event_reporter.rb line 579
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::EventReporter