1. Socket::
  2. ResolutionError

class Socket::ResolutionError

Socket::ResolutionError is the error class for hostname resolution.

Public Instance Methods

Source
static VALUEsock_resolv_error_code(VALUE self){    return rb_attr_get(self, id_error_code);}

Returns the raw error code indicating the cause of the hostname resolution failure.

beginAddrinfo.getaddrinfo("ruby-lang.org",nil)rescueSocket::ResolutionError=>eife.error_code==Socket::EAI_AGAINputs"Temporary failure in name resolution."endend

Note that error codes depend on the operating system.