Sha256: 46797d6a7de763aa6e38d8ef5f9ba86aad5b5ff0f75b30c919a9758cc01a39b0

Contents?: true

Size: 858 Bytes

Versions: 40

Compression:

Stored size: 858 Bytes

Contents

module Cucumber
  module WireSupport
    # Proxy for an exception that occured at the remote end of the wire
    class WireException < StandardError
      module CanSetName
        attr_writer :exception_name
        def to_s
          @exception_name
        end
      end

      def initialize(args, config)
        super args['message']
        if args['exception']
          self.class.extend(CanSetName)
          self.class.exception_name = "#{args['exception']} from #{config}"
        end
        if args['backtrace']
          @backtrace = if args['backtrace'].is_a?(String)
              args['backtrace'].split("\n") # TODO: change cuke4nuke to pass an array instead of a big string
            else
              args['backtrace']
            end
        end
      end

      def backtrace
        @backtrace || super
      end
    end
  end
end

Version data entries

40 entries across 38 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/lib/cucumber/wire_support/wire_exception.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/lib/cucumber/wire_support/wire_exception.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/lib/cucumber/wire_support/wire_exception.rb
cucumber-2.1.0 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.2 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.1 lib/cucumber/wire_support/wire_exception.rb
cucumber-1.3.20 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.rc.5 lib/cucumber/wire_support/wire_exception.rb
cucumber-1.3.19 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.rc.4 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.rc.3 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.rc.2 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.rc.1 lib/cucumber/wire_support/wire_exception.rb
cucumber-1.3.18 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.beta.5 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.beta.4 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.beta.3 lib/cucumber/wire_support/wire_exception.rb
cucumber-1.3.17 lib/cucumber/wire_support/wire_exception.rb
cucumber-2.0.0.beta.2 lib/cucumber/wire_support/wire_exception.rb