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.



78
79
80
81
82
# File 'lib/httpx/errors.rb', line 78

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.



74
75
76
# File 'lib/httpx/errors.rb', line 74

def connection
  @connection
end

#hostObject (readonly)

Returns the value of attribute host.



74
75
76
# File 'lib/httpx/errors.rb', line 74

def host
  @host
end