ObjFW  Check-in [61668023dd]

Overview
Comment:Rename OFLink{ -> Item}FailedException
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 61668023dd124b2ddde446d3794aacd4f9932f341384b4f59e8bb7222d67e4d2
User & Date: js on 2022-09-25 13:54:56
Other Links: manifest | tags
Context
2022-09-25
14:00
OF{Retrieve -> Get}ItemAttributesFailedException check-in: 78032c89cb user: js tags: trunk
13:54
Rename OFLink{ -> Item}FailedException check-in: 61668023dd user: js tags: trunk
13:52
Document more exceptions check-in: 3d09d83f70 user: js tags: trunk
Changes

Modified src/OFFileURLHandler.m from [9f18f4fcb5] to [b167887f43].

55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
55
56
57
58
59
60
61

62
63
64
65
66
67
68
69







-
+







# import "OFMutex.h"
#endif

#import "OFCreateDirectoryFailedException.h"
#import "OFCreateSymbolicLinkFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFLinkFailedException.h"
#import "OFLinkItemFailedException.h"
#import "OFMoveItemFailedException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFRetrieveItemAttributesFailedException.h"
1350
1351
1352
1353
1354
1355
1356
1357

1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368

1369
1370
1371
1372
1373
1374
1375
1350
1351
1352
1353
1354
1355
1356

1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367

1368
1369
1370
1371
1372
1373
1374
1375







-
+










-
+







	destinationPath = destination.fileSystemRepresentation;

# ifndef OF_WINDOWS
	OFStringEncoding encoding = [OFLocale encoding];

	if (link([sourcePath cStringWithEncoding: encoding],
	    [destinationPath cStringWithEncoding: encoding]) != 0)
		@throw [OFLinkFailedException
		@throw [OFLinkItemFailedException
		    exceptionWithSourceURL: source
			    destinationURL: destination
				     errNo: errno];
# else
	if (createHardLinkWFuncPtr == NULL)
		@throw [OFNotImplementedException exceptionWithSelector: _cmd
								 object: self];

	if (!createHardLinkWFuncPtr(destinationPath.UTF16String,
	    sourcePath.UTF16String, NULL))
		@throw [OFLinkFailedException
		@throw [OFLinkItemFailedException
		    exceptionWithSourceURL: source
			    destinationURL: destination
				     errNo: retrieveError()];
# endif

	objc_autoreleasePoolPop(pool);
}

Modified src/ObjFW.h from [fc4b4c5f03] to [ed41c116dc].

189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
189
190
191
192
193
194
195

196
197
198
199
200
201
202
203







-
+







#endif
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFInvalidJSONException.h"
#import "OFInvalidServerResponseException.h"
#import "OFLinkFailedException.h"
#import "OFLinkItemFailedException.h"
#ifdef OF_HAVE_SOCKETS
# import "OFListenFailedException.h"
#endif
#ifdef OF_HAVE_PLUGINS
# import "OFLoadPluginFailedException.h"
#endif
#import "OFLockFailedException.h"

Modified src/exceptions/Makefile from [1015937e29] to [d16f99569d].

16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30







-
+







       OFHashNotCalculatedException.m			\
       OFInitializationFailedException.m		\
       OFInvalidArgumentException.m			\
       OFInvalidEncodingException.m			\
       OFInvalidFormatException.m			\
       OFInvalidJSONException.m				\
       OFInvalidServerResponseException.m		\
       OFLinkFailedException.m				\
       OFLinkItemFailedException.m			\
       OFLockFailedException.m				\
       OFMalformedXMLException.m			\
       OFMoveItemFailedException.m			\
       OFNotImplementedException.m			\
       OFNotOpenException.m				\
       OFOpenItemFailedException.m			\
       OFOutOfMemoryException.m				\

Renamed and modified src/exceptions/OFLinkFailedException.h [d8c1abe3a6] to src/exceptions/OFLinkItemFailedException.h [9e9934b885].

16
17
18
19
20
21
22
23
24


25
26
27
28

29
30
31
32

33
34
35
36
37
38
39
16
17
18
19
20
21
22


23
24
25
26
27

28
29
30
31

32
33
34
35
36
37
38
39







-
-
+
+



-
+



-
+







#import "OFException.h"

OF_ASSUME_NONNULL_BEGIN

@class OFURL;

/**
 * @class OFLinkFailedException \
 *	  OFLinkFailedException.h ObjFW/OFLinkFailedException.h
 * @class OFLinkItemFailedException \
 *	  OFLinkItemFailedException.h ObjFW/OFLinkItemFailedException.h
 *
 * @brief An exception indicating that creating a link failed.
 */
@interface OFLinkFailedException: OFException
@interface OFLinkItemFailedException: OFException
{
	OFURL *_sourceURL, *_destinationURL;
	int _errNo;
	OF_RESERVE_IVARS(OFLinkFailedException, 4)
	OF_RESERVE_IVARS(OFLinkItemFailedException, 4)
}

/**
 * @brief A URL with the source for the link.
 */
@property (readonly, nonatomic) OFURL *sourceURL;

Renamed and modified src/exceptions/OFLinkFailedException.m [7710ab3fd2] to src/exceptions/OFLinkItemFailedException.m [6a168f2101].

11
12
13
14
15
16
17
18

19
20
21
22

23
24
25
26
27
28
29
11
12
13
14
15
16
17

18
19
20
21

22
23
24
25
26
27
28
29







-
+



-
+







 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFLinkFailedException.h"
#import "OFLinkItemFailedException.h"
#import "OFString.h"
#import "OFURL.h"

@implementation OFLinkFailedException
@implementation OFLinkItemFailedException
@synthesize sourceURL = _sourceURL, destinationURL = _destinationURL;
@synthesize errNo = _errNo;

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}