Exception: HTTPX::NativeResolveError

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

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.

Parameters:

  • connection (Connection)
  • hostname (String)
  • message (String) (defaults to: "Can't resolve #{host}")


96
97
98
99
100
# File 'lib/httpx/errors.rb', line 96

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

Instance Attribute Details

#connectionConnection?

Returns the value of attribute connection.

Returns:



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

def connection
  @connection
end

#hostString (readonly)

Returns the value of attribute host.

Returns:

  • (String)


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

def host
  @host
end