Exception: Excon::Error::Socket

Inherits:
Excon::Error show all
Defined in:
lib/excon/error.rb

Overview

Socket related errors

Direct Known Subclasses

Certificate

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Excon::Error

status_error, status_errors

Constructor Details

#initialize(socket_error = Excon::Error.new) ⇒ Socket

Returns a new instance of Socket.



15
16
17
18
19
20
21
22
23
# File 'lib/excon/error.rb', line 15

def initialize(socket_error = Excon::Error.new)
  if is_a?(Certificate) || is_a?(Excon::Errors::CertificateError)
    super
  else
    super("#{socket_error.message} (#{socket_error.class})")
    set_backtrace(socket_error.backtrace)
    @socket_error = socket_error
  end
end

Instance Attribute Details

#socket_errorObject (readonly)

Returns the value of attribute socket_error.



13
14
15
# File 'lib/excon/error.rb', line 13

def socket_error
  @socket_error
end