Sha256: 69c5115c01d4f6e2e44b1a1a17454de7483b4d548370e86af9a9586bd8581fc1
Contents?: true
Size: 560 Bytes
Versions: 13
Compression:
Stored size: 560 Bytes
Contents
module Bugsnag::Middleware class IgnoreErrorClass def initialize(bugsnag) @bugsnag = bugsnag end def call(report) ignore_error_class = report.raw_exceptions.any? do |ex| ancestor_chain = ex.class.ancestors.select { |ancestor| ancestor.is_a?(Class) }.to_set report.configuration.ignore_classes.any? do |to_ignore| to_ignore.is_a?(Proc) ? to_ignore.call(ex) : ancestor_chain.include?(to_ignore) end end report.ignore! if ignore_error_class @bugsnag.call(report) end end end
Version data entries
13 entries across 13 versions & 1 rubygems