Sha256: 06e6e376d4159136749c833e7e26165b9282e819a6bf7bf4888a9c0dafb25121
Contents?: true
Size: 752 Bytes
Versions: 22
Compression:
Stored size: 752 Bytes
Contents
module Bugsnag::Middleware ## # Determines if the exception should be ignored based on the configured # `discard_classes` class DiscardErrorClass ## # @param middleware [#call] The next middleware to call def initialize(middleware) @middleware = middleware end ## # @param report [Report] def call(report) should_discard = report.raw_exceptions.any? do |ex| report.configuration.discard_classes.any? do |to_ignore| case to_ignore when String then to_ignore == ex.class.name when Regexp then to_ignore =~ ex.class.name else false end end end report.ignore! if should_discard @middleware.call(report) end end end
Version data entries
22 entries across 22 versions & 1 rubygems