Sha256: 0607fd427d04d926e7fd39c8ddcd4e88946b08eb5361a7d7ef989e49c77b21ca

Contents?: true

Size: 879 Bytes

Versions: 85

Compression:

Stored size: 879 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, host, port)
        super args['message']
        if args['exception']
          self.class.extend(CanSetName)
          self.class.exception_name = "#{args['exception']} from #{host}:#{port}"
        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

85 entries across 83 versions & 12 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.8/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
candlepin-api-0.4.0 bundle/ruby/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
casecumber-1.0.2.1 lib/cucumber/wire_support/wire_exception.rb
casecumber-1.2.1.cb2 lib/cucumber/wire_support/wire_exception.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/lib/cucumber/wire_support/wire_exception.rb
cucumber-1.2.1 lib/cucumber/wire_support/wire_exception.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
ftl-0.2.0 vendor/bundle/gems/cucumber-1.2.0/lib/cucumber/wire_support/wire_exception.rb
cucumber-1.2.0 lib/cucumber/wire_support/wire_exception.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/wire_support/wire_exception.rb