@@ -25,12 +25,12 @@ * @brief An exception indicating that resolving a host failed. */ @interface OFResolveHostFailedException: OFException { OFString *_host; - of_socket_address_family_t _addressFamily; - of_dns_resolver_error_t _error; + OFSocketAddressFamily _addressFamily; + OFDNSResolverErrorCode _errorCode; } /** * @brief The host which could not be resolved. */ @@ -37,40 +37,40 @@ @property (readonly, nonatomic) OFString *host; /** * @brief The address family for which the host could not be resolved. */ -@property (readonly, nonatomic) of_socket_address_family_t addressFamily; +@property (readonly, nonatomic) OFSocketAddressFamily addressFamily; /** - * @brief The error from the resolver. + * @brief The error code from the resolver. */ -@property (readonly, nonatomic) of_dns_resolver_error_t error; +@property (readonly, nonatomic) OFDNSResolverErrorCode errorCode; /** * @brief Creates a new, autoreleased resolve host failed exception. * * @param host The host which could not be resolved * @param addressFamily The address family for which the host could not be * resolved - * @param error The error from the resolver + * @param errorCode The error code from the resolver * @return A new, autoreleased address translation failed exception */ + (instancetype)exceptionWithHost: (OFString *)host - addressFamily: (of_socket_address_family_t)addressFamily - error: (of_dns_resolver_error_t)error; + addressFamily: (OFSocketAddressFamily)addressFamily + errorCode: (OFDNSResolverErrorCode)errorCode; /** * @brief Initializes an already allocated resolve host failed exception. * * @param host The host which could not be resolved * @param addressFamily The address family for which the host could not be * resolved - * @param error The error from the resolver + * @param errorCode The error code from the resolver * @return An initialized address translation failed exception */ - (instancetype)initWithHost: (OFString *)host - addressFamily: (of_socket_address_family_t)addressFamily - error: (of_dns_resolver_error_t)error; + addressFamily: (OFSocketAddressFamily)addressFamily + errorCode: (OFDNSResolverErrorCode)errorCode; @end OF_ASSUME_NONNULL_END