Fork me on GitHub

Error Reference

As described in the introduction to Errors & Exceptions, error classes can be grouped into categories, according to their scope. We can identify 4 categories:

  1. Base Errors: contains the base error class Whois::Error.
  2. Server Errors: contains errors raised by the server component. It mostly includes definition errors.
  3. Interface Errors: contains errors raised in case of a WHOIS interface for a domain is missing or invalid.
  4. Parser Errors: contains errors generated by the parser component during the analysis or elaboration of a WHOIS record.
  5. Response Errors: contains errors raised when the server response is not successful.

Here's the error list, grouped by category.

| Category | Class | |--------------------|-------------------------------------------------------------------------------------| | Base Errors | Whois::Error | | Connection Errors | Whois::ConnectionError | | Server Errors | Whois::ServerError | | | Whois::ServerNotFound | | | Whois::ServerNotImplemented | | | Whois::ServerNotSupported | | | Whois::AllocationUnknown | | Interface Errors | Whois::InterfaceNotSupported | | | Whois::NoInterfaceError | | | Whois::WebInterfaceError | | Parser Errors | Whois::ParserError | | | Whois::ParserNotFound | | | Whois::AttributeNotImplemented | | | Whois::AttributeNotSupported | | Response Errors | Whois::ResponseError | | | Whois::ResponseIsThrottled | | | Whois::ResponseIsUnavailable |

Base Errors {#errors-reference-base}

Whois::Error {#errors-reference-whois-error}

This is the base exception class for any Whois error. All Whois exceptions inherits from this class. This error is never raised directly.

Connection Errors {#errors-reference-connection}

Whois::ConnectionError {#errors-reference-whois-connectionerror}

Raised when the connection to the WHOIS server fails.

r = Whois.whois ""
# => raise Whois::ConnectionError,
#          "Errno::ECONNREFUSED: Connection refused - connect(2)"

Server Errors {#errors-reference-server}

Whois::ServerError {#errors-reference-whois-servererror}

Generic class for server errors. This error is never raised directly.

Whois::ServerNotFound {#errors-reference-whois-servernotfound}

Raised when the class hasn't been able to select a valid server probably because definitions are outdated.

Definition is not recognized.

Whois::ServerNotImplemented {#errors-reference-whois-servernotimplemented}

Raised when we know about a specific functionality but this functionality has not been implemented yet. This is usually the result of a porting from a third-party library.

Definition is recognized.

Whois::ServerNotSupported {#errors-reference-whois-servernotsupported}

Raised when no WHOIS server is known for this kind of object.

Definition is recognized.

Whois::AllocationUnknown {#errors-reference-whois-allocationunknown}

Raised when unknown AS number of IP network.

Definition is recognized.

Interface Errors {#errors-reference-interface}

Whois::InterfaceNotSupported {#errors-reference-whois-interfacenotsupported}

Generic class for interfaces not supported. This error is never raised directly.

Whois::NoInterfaceError {#errors-reference-whois-nointerfaceerror}

Raised when a server is known to not be available for this kind of object or because this specific object doesn't support WHOIS.

Whois::WebInterfaceError #{#errors-reference-whois-webinterfaceerror}

Raised when the class has found a server but it doesn't support the standard WHOIS interface via port 43. This is the case of some specific domains that only provide a web-based WHOIS interface.

Parser Errors {#errors-reference-parser}

Whois::ParserError {#errors-reference-whois-parsererror}

Generic class for parser errors. This error is never raised directly.

Whois::ParserNotFound {#errors-reference-whois-parsernotfound}

Raised when the library hasn't been able to load a valid parser according to current settings and you're trying to access a property that requires a valid parser.

r = Whois.whois ""
p = r.parser.parsers.first

# assuming the parser is not supported
# the default parser is used
# => Whois::Record::Parser::Blank

# => raise Whois::ParserNotFound

Whois::AttributeNotImplemented {#errors-reference-whois-propertynotimplemented}

Raised when the property method has not been overwritten (implemented) in a child parser class.

Whois::AttributeNotSupported {#errors-reference-whois-propertynotsupported}

Raised when you are trying to access a property that is not supported for the current WHOIS record.

Response Errors {#errors-reference-response}

Whois::ResponseError {#errors-reference-whois-responseerror}

Generic class for response errors. This error is never raised directly.

Whois::ResponseIsThrottled {#errors-reference-whois-responseisthrottled}

Raised when the response contains a throttling message.

r = Whois.whois ""

puts r.to_s
# => " daily whois-limit exceeded"

# => raise Whois::ResponseIsThrottled

Whois::ResponseIsUnavailable {#errors-reference-whois-responseisunavailable}

Raised when the response contains an unavailable message.

r = Whois.whois ""

puts r.to_s
# => "Service temporarily unavailable.\n"

# => raise Whois::ResponseIsUnavailable