Exception: Puppeteer::Connection::ProtocolError

Inherits:
Error
  • Object
show all
Defined in:
lib/puppeteer/connection.rb,
sig/_supplementary.rbs

Direct Known Subclasses

TargetCloseError

Instance Attribute Summary

Attributes inherited from Error

#cause

Instance Method Summary collapse

Constructor Details

#initialize(method:, error_message:, error_data: nil) ⇒ ProtocolError

Returns a new instance of ProtocolError.

Parameters:

  • method: (String)
  • error_message: (String)
  • error_data: (Object) (defaults to: nil)


10
11
12
13
14
15
16
17
# File 'lib/puppeteer/connection.rb', line 10

def initialize(method:, error_message:, error_data: nil)
  msg = "Protocol error (#{method}): #{error_message}"
  if error_data
    super("#{msg} #{error_data}")
  else
    super(msg)
  end
end