ObjFW  Check-in [07ce6e545b]

Overview
Comment:Add missing OF_UNAVAILABLE
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 07ce6e545bfb76185ca5060f0904d317f3e3361eb87e9f7b27d520f7551a681c
User & Date: js on 2022-04-24 09:35:58
Other Links: manifest | tags
Context
2022-04-24
09:40
Reorder more declarations for consistency check-in: 7e1d2b5cd6 user: js tags: trunk
09:35
Add missing OF_UNAVAILABLE check-in: 07ce6e545b user: js tags: trunk
2022-04-23
14:29
OF{Lock,Unlock}FailedException: Allow nil lock check-in: 89bdb9c496 user: js tags: trunk
Changes

Modified src/exceptions/OFResolveHostFailedException.h from [0f2632a039] to [26d03aec04].

55
56
57
58
59
60
61


62
63
64
65
66
67
68
69
70
71
72
73


74
75
76
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80







+
+












+
+



 * @param errorCode The error code from the resolver
 * @return A new, autoreleased address translation failed exception
 */
+ (instancetype)exceptionWithHost: (OFString *)host
		    addressFamily: (OFSocketAddressFamily)addressFamily
			errorCode: (OFDNSResolverErrorCode)errorCode;

+ (instancetype)exception OF_UNAVAILABLE;

/**
 * @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 errorCode The error code from the resolver
 * @return An initialized address translation failed exception
 */
- (instancetype)initWithHost: (OFString *)host
	       addressFamily: (OFSocketAddressFamily)addressFamily
		   errorCode: (OFDNSResolverErrorCode)errorCode;

- (instancetype)init OF_UNAVAILABLE;
@end

OF_ASSUME_NONNULL_END

Modified src/exceptions/OFResolveHostFailedException.m from [c7c18985ac] to [a81a110c2f].

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
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
68







+
+
+
+
+


















+
+
+
+
+







		    addressFamily: (OFSocketAddressFamily)addressFamily
			errorCode: (OFDNSResolverErrorCode)errorCode
{
	return [[[self alloc] initWithHost: host
			     addressFamily: addressFamily
				 errorCode: errorCode] autorelease];
}

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}

- (instancetype)initWithHost: (OFString *)host
	       addressFamily: (OFSocketAddressFamily)addressFamily
		   errorCode: (OFDNSResolverErrorCode)errorCode
{
	self = [super init];

	@try {
		_host = [host copy];
		_addressFamily = addressFamily;
		_errorCode = errorCode;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (void)dealloc
{
	[_host release];

	[super dealloc];
}