Differences From Artifact [bf9ae11420]:
- File
src/exceptions/OFDNSQueryFailedException.m
— part of check-in
[d69f7bc1ff]
at
2019-10-06 16:27:12
on branch trunk
— Rename OFDNSRequest -> OFDNSQuery
This is now in alignment with the terminology of the RFC. (user: js, size: 2423) [annotate] [blame] [check-ins using]
To Artifact [04f5be8a60]:
- File
src/exceptions/OFDNSQueryFailedException.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: 2443) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #include "config.h" #import "OFDNSQueryFailedException.h" #import "OFString.h" @implementation OFDNSQueryFailedException @synthesize query = _query, error = _error; + (instancetype)exceptionWithQuery: (OFDNSQuery *)query error: (of_dns_resolver_error_t)error { | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | * file. */ #include "config.h" #import "OFDNSQueryFailedException.h" #import "OFString.h" OFString * of_dns_resolver_error_to_string(of_dns_resolver_error_t error) { switch (error) { case OF_DNS_RESOLVER_ERROR_TIMEOUT: return @"The query timed out."; case OF_DNS_RESOLVER_ERROR_CANCELED: return @"The query was canceled."; case OF_DNS_RESOLVER_ERROR_NO_RESULT: return @"No result for the specified host with the specified " @"type and class."; case OF_DNS_RESOLVER_ERROR_SERVER_INVALID_FORMAT: return @"The server considered the query to be malformed."; case OF_DNS_RESOLVER_ERROR_SERVER_FAILURE: return @"The server was unable to process due to an internal " @"error."; case OF_DNS_RESOLVER_ERROR_SERVER_NAME_ERROR: return @"The server returned an error that the domain does not " @"exist."; case OF_DNS_RESOLVER_ERROR_SERVER_NOT_IMPLEMENTED: return @"The server does not have support for the requested " @"query."; case OF_DNS_RESOLVER_ERROR_SERVER_REFUSED: return @"The server refused the query."; default: return @"Unknown error."; } } @implementation OFDNSQueryFailedException @synthesize query = _query, error = _error; + (instancetype)exceptionWithQuery: (OFDNSQuery *)query error: (of_dns_resolver_error_t)error { |
︙ | ︙ | |||
51 52 53 54 55 56 57 | [_query release]; [super dealloc]; } - (OFString *)description { | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | > | 80 81 82 83 84 85 86 87 88 89 90 91 | [_query release]; [super dealloc]; } - (OFString *)description { return [OFString stringWithFormat: @"DNS query %@ could not be performed: %@", _query, of_dns_resolver_error_to_string(_error)]; } @end |