Class: Airbrake::Rails::ActionCable::NotifyCallback Private

Inherits:
Object
  • Object
show all
Defined in:
lib/airbrake/rails/action_cable/notify_callback.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • v8.3.0

Class Method Summary collapse

Class Method Details

.call(channel, block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • v8.3.0



9
10
11
12
13
14
15
16
17
18
# File 'lib/airbrake/rails/action_cable/notify_callback.rb', line 9

def self.call(channel, block)
  block.call
rescue Exception => ex # rubocop:disable Lint/RescueException
  notice = Airbrake.build_notice(ex)
  notice[:context][:component] = 'action_cable'
  notice[:context][:action] = channel.channel_name
  Airbrake.notify(notice)

  raise ex
end