Exception: HTTPX::NativeResolveError

Inherits:
ResolveError show all
Defined in:
lib/httpx/errors.rb

Overview

Error raised when there was an error while resolving a domain to an IP using a HTTPX::Resolver::Native resolver.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, host, message = "Can't resolve #{host}") ⇒ NativeResolveError

initializes the exception with the connection it refers to, the host domain which failed to resolve, and the error message.



90
91
92
93
94
# File 'lib/httpx/errors.rb', line 90

def initialize(connection, host, message = "Can't resolve #{host}")
  @connection = connection
  @host = host
  super(message)
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



86
87
88
# File 'lib/httpx/errors.rb', line 86

def connection
  @connection
end

#hostObject (readonly)

Returns the value of attribute host.



86
87
88
# File 'lib/httpx/errors.rb', line 86

def host
  @host
end