Sha256: 58be8f9355118e776806542cafb0affb3b85e62769b6afa0f6137fb357089dd2

Contents?: true

Size: 809 Bytes

Versions: 2

Compression:

Stored size: 809 Bytes

Contents

module Capybara
  module Poltergeist
    class Error < StandardError
    end

    class BrowserError < Error
      attr_reader :text

      def initialize(text)
        @text = text
      end

      def message
        "Received error from PhantomJS client: #{text}"
      end
    end

    class ObsoleteNode < Error
      attr_reader :node

      def initialize(node)
        @node = node
      end
    end

    class TimeoutError < Error
      def initialize(message)
        @message = message
      end

      def message
        "Timed out waiting for response to #{@message}"
      end
    end

    class DeadClient < Error
      def initialize(message)
        @message = message
      end

      def message
        "The PhantomJS client died while processing #{@message}"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
poltergeist-0.3.0 lib/capybara/poltergeist/errors.rb
poltergeist-0.2.0 lib/capybara/poltergeist/errors.rb