Sha256: a36621db0472210982ae31a3cea3f49ea5dc2f831d45b280e9bde82c384257f7

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 Bytes

Contents

# frozen_string_literal: true

require 'aranha/parsers/invalid_state_exception'
require 'aranha/parsers/source_address/fetch_content_error'
require 'eac_ruby_utils/core_ext'
require 'selenium-webdriver'

module Aranha
  module TemporaryErrors
    ARANHA_ERRORS = [::Aranha::Parsers::InvalidStateException,
                     ::Aranha::Parsers::SourceAddress::FetchContentError].freeze
    CORE_ERRORS = [::SocketError].freeze
    ERRNO_ERRORS = [Errno::ECONNREFUSED, ::Errno::ECONNRESET].freeze
    NET_ERRORS = [::Net::HTTPFatalError, ::Net::HTTPServerException, ::Net::OpenTimeout].freeze
    SELENIUM_ERRORS = [::Selenium::WebDriver::Error::TimeoutError].freeze

    ALL_ERRORS = ARANHA_ERRORS + CORE_ERRORS + ERRNO_ERRORS + NET_ERRORS + SELENIUM_ERRORS

    class << self
      def errors
        ALL_ERRORS
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aranha-0.19.2 lib/aranha/temporary_errors.rb
aranha-0.19.1 lib/aranha/temporary_errors.rb
aranha-0.19.0 lib/aranha/temporary_errors.rb