Sha256: ed3c51b893972354fc2cf740df4e47ba69a00ac6b6f48b9b09d2f4263ee39d59

Contents?: true

Size: 546 Bytes

Versions: 18

Compression:

Stored size: 546 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.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

18 entries across 18 versions & 2 rubygems

Version Path
adva-0.3.2 test/rr/lib/rr/errors/rr_error.rb
adva-0.3.1 test/rr/lib/rr/errors/rr_error.rb
adva-0.3.0 test/rr/lib/rr/errors/rr_error.rb
adva-0.2.4 test/rr/lib/rr/errors/rr_error.rb
adva-0.2.3 test/rr/lib/rr/errors/rr_error.rb
adva-0.2.2 test/rr/lib/rr/errors/rr_error.rb
adva-0.2.1 test/rr/lib/rr/errors/rr_error.rb
adva-0.2.0 test/rr/lib/rr/errors/rr_error.rb
adva-0.1.4 test/rr/lib/rr/errors/rr_error.rb
adva-0.1.3 test/rr/lib/rr/errors/rr_error.rb
adva-0.1.2 test/rr/lib/rr/errors/rr_error.rb
adva-0.1.1 test/rr/lib/rr/errors/rr_error.rb
adva-0.1.0 test/rr/lib/rr/errors/rr_error.rb
adva-0.0.1 test/rr/lib/rr/errors/rr_error.rb
rr-0.4.9 lib/rr/errors/rr_error.rb
rr-0.6.0 lib/rr/errors/rr_error.rb
rr-0.4.10 lib/rr/errors/rr_error.rb
rr-0.7.0 lib/rr/errors/rr_error.rb