Sha256: 6fb6ecf24421fbbef16ce1352ed604233aa23b60c3104c8889a95a991bec8fd2

Contents?: true

Size: 380 Bytes

Versions: 1

Compression:

Stored size: 380 Bytes

Contents

module Sentry
  module Utils
    module ExceptionCauseChain
      def self.exception_to_array(exception)
        exceptions = [exception]

        while exception.cause
          exception = exception.cause
          break if exceptions.any? { |e| e.object_id == exception.object_id }

          exceptions << exception
        end

        exceptions
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sentry-ruby-core-4.8.0 lib/sentry/utils/exception_cause_chain.rb