Differences From Artifact [5ebb9198c3]:
- File src/exceptions/OFResolveHostFailedException.m — part of check-in [0509d7a844] at 2019-01-03 19:13:03 on branch trunk — Update copyright (user: js, size: 2851) [annotate] [blame] [check-ins using]
To Artifact [3a43359e82]:
- File
src/exceptions/OFResolveHostFailedException.m
— part of check-in
[ee592cf603]
at
2019-10-07 00:07:55
on branch trunk
— OFDNSResolver: Major refactor
This temporarily doesn't use the search domains anymore and makes CNAMEs
slightly more inefficient. The next commits will fix both. (user: js, size: 1700) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFResolveHostFailedException.h" #import "OFString.h" @implementation OFResolveHostFailedException | > | < | < | < | < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFResolveHostFailedException.h" #import "OFDNSQueryFailedException.h" #import "OFString.h" @implementation OFResolveHostFailedException @synthesize host = _host, addressFamily = _addressFamily, error = _error; + (instancetype)exceptionWithHost: (OFString *)host addressFamily: (of_socket_address_family_t)addressFamily error: (of_dns_resolver_error_t)error { return [[[self alloc] initWithHost: host addressFamily: addressFamily error: error] autorelease]; } - (instancetype)initWithHost: (OFString *)host addressFamily: (of_socket_address_family_t)addressFamily error: (of_dns_resolver_error_t)error { self = [super init]; @try { _host = [host copy]; _addressFamily = addressFamily; _error = error; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_host release]; [super dealloc]; } - (OFString *)description { return [OFString stringWithFormat: @"The host %@ could not be resolved: %@", _host, of_dns_resolver_error_to_string(_error)]; } @end |