Class: Airbrake::Filters::SystemExitFilter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/airbrake-ruby/filters/system_exit_filter.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.

Skip over SystemExit exceptions, because they’re just noise.

Constant Summary collapse

SYSTEM_EXIT_TYPE =

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

Returns:

  • (String)
'SystemExit'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSystemExitFilter

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.

Returns a new instance of SystemExitFilter.



12
13
14
# File 'lib/airbrake-ruby/filters/system_exit_filter.rb', line 12

def initialize
  @weight = 130
end

Instance Attribute Details

#weightInteger (readonly)

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.

Returns:

  • (Integer)


10
11
12
# File 'lib/airbrake-ruby/filters/system_exit_filter.rb', line 10

def weight
  @weight
end

Instance Method Details

#call(notice) ⇒ void

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.

This method returns an undefined value.

This is a mandatory method required by any filter integrated with FilterChain.

Parameters:

  • notice (Notice)

    the notice to be filtered

See Also:



17
18
19
20
21
# File 'lib/airbrake-ruby/filters/system_exit_filter.rb', line 17

def call(notice)
  return if notice[:errors].none? { |error| error[:type] == SYSTEM_EXIT_TYPE }

  notice.ignore!
end