Exception: Ferrum::PendingConnectionsError

Inherits:
StatusError show all
Defined in:
lib/ferrum/errors.rb

Overview

Raised when the request reached the server, but the page still has pending network connections that never settled.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, pendings = []) ⇒ PendingConnectionsError

Returns a new instance of PendingConnectionsError.



32
33
34
35
36
37
38
# File 'lib/ferrum/errors.rb', line 32

def initialize(url, pendings = [])
  @pendings = pendings
  message = "Request to #{url} reached server, but there are still pending connections"
  message += ": #{pendings.join(', ')}" unless @pendings.empty?

  super(url, message)
end

Instance Attribute Details

#pendingsObject (readonly)

Returns the value of attribute pendings.



30
31
32
# File 'lib/ferrum/errors.rb', line 30

def pendings
  @pendings
end