Sha256: 283aedfc20f04fdbc35cdab4ec3003544171ea59638b4438ea18d8abe2bb3c3f

Contents?: true

Size: 553 Bytes

Versions: 9

Compression:

Stored size: 553 Bytes

Contents

module RR
  module Errors
    BACKTRACE_IDENTIFIER = /lib\/rr/

    class RRError < RuntimeError
      attr_writer :backtrace
      def backtrace
        original_backtrace = (@backtrace) ? @backtrace : super
        return original_backtrace unless RR::Space.trim_backtrace

        return original_backtrace unless original_backtrace.respond_to?(:each)
        new_backtrace = []
        original_backtrace.each do |line|
          new_backtrace << line unless line =~ BACKTRACE_IDENTIFIER
        end
        new_backtrace
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rr-0.4.7 lib/rr/errors/rr_error.rb
rr-0.4.1 lib/rr/errors/rr_error.rb
rr-0.4.4 lib/rr/errors/rr_error.rb
rr-0.4.6 lib/rr/errors/rr_error.rb
rr-0.4.8 lib/rr/errors/rr_error.rb
rr-0.4.3 lib/rr/errors/rr_error.rb
rr-0.4.5 lib/rr/errors/rr_error.rb
rr-0.4.0 lib/rr/errors/rr_error.rb
rr-0.4.2 lib/rr/errors/rr_error.rb