Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | exceptions: Add nullability specifiers |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
cc4cb0d824244f0dff026c3516cd1739 |
| User & Date: | js 2017-05-02 21:10:33.000 |
Context
|
2017-05-06
| ||
| 19:25 | OFMutableString: Add missing #ifdef check-in: 322bbaf8e9 user: js tags: trunk | |
|
2017-05-02
| ||
| 21:10 | exceptions: Add nullability specifiers check-in: cc4cb0d824 user: js tags: trunk | |
|
2017-05-01
| ||
| 18:48 | Add OF_NULL_RESETTABLE_PROPERTY check-in: 3faceccdd3 user: js tags: trunk | |
Changes
Changes to src/OFKernelEventObserver_epoll.m.
| ︙ | ︙ | |||
47 48 49 50 51 52 53 |
self = [super init];
@try {
struct epoll_event event;
#ifdef HAVE_EPOLL_CREATE1
if ((_epfd = epoll_create1(EPOLL_CLOEXEC)) == -1)
| | > | > | > | 47 48 49 50 51 52 53 54 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 81 82 83 84 |
self = [super init];
@try {
struct epoll_event event;
#ifdef HAVE_EPOLL_CREATE1
if ((_epfd = epoll_create1(EPOLL_CLOEXEC)) == -1)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
#else
int flags;
if ((_epfd = epoll_create(1)) == -1)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
if ((flags = fcntl(_epfd, F_GETFD, 0)) != -1)
fcntl(_epfd, F_SETFD, flags | FD_CLOEXEC);
#endif
_FDToEvents = [[OFMapTable alloc]
initWithKeyFunctions: mapFunctions
objectFunctions: mapFunctions];
memset(&event, 0, sizeof(event));
event.events = EPOLLIN;
event.data.ptr = [OFNull null];
if (epoll_ctl(_epfd, EPOLL_CTL_ADD, _cancelFD[0], &event) == -1)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
|
| ︙ | ︙ |
Changes to src/OFKernelEventObserver_select.m.
| ︙ | ︙ | |||
45 46 47 48 49 50 51 |
@implementation OFKernelEventObserver_select
- init
{
self = [super init];
#ifndef OF_WINDOWS
if (_cancelFD[0] >= (int)FD_SETSIZE)
| | > | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
@implementation OFKernelEventObserver_select
- init
{
self = [super init];
#ifndef OF_WINDOWS
if (_cancelFD[0] >= (int)FD_SETSIZE)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
#endif
FD_ZERO(&_readFDs);
FD_ZERO(&_writeFDs);
FD_SET(_cancelFD[0], &_readFDs);
if (_cancelFD[0] > INT_MAX)
|
| ︙ | ︙ |
Changes to src/OFString.m.
| ︙ | ︙ | |||
586 587 588 589 590 591 592 | if (self != [OFString class]) return; placeholder.isa = [OFString_placeholder class]; #if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L) if ((cLocale = newlocale(LC_ALL_MASK, "C", NULL)) == NULL) | | > | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
if (self != [OFString class])
return;
placeholder.isa = [OFString_placeholder class];
#if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L)
if ((cLocale = newlocale(LC_ALL_MASK, "C", NULL)) == NULL)
@throw [OFInitializationFailedException
exceptionWithClass: self];
#endif
}
+ alloc
{
if (self == [OFString class])
return (id)&placeholder;
|
| ︙ | ︙ |
Changes to src/exceptions/OFAcceptFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif /*! * @class OFAcceptFailedException \ * OFAcceptFailedException.h ObjFW/OFAcceptFailedException.h * * @brief An exception indicating that accepting a connection failed. */ @interface OFAcceptFailedException: OFException | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN /*! * @class OFAcceptFailedException \ * OFAcceptFailedException.h ObjFW/OFAcceptFailedException.h * * @brief An exception indicating that accepting a connection failed. */ @interface OFAcceptFailedException: OFException |
| ︙ | ︙ | |||
58 59 60 61 62 63 64 | * @param socket The socket which could not accept a connection * @param errNo The errno for the error * @return An initialized accept failed exception */ - initWithSocket: (id)socket errNo: (int)errNo; @end | > > | 60 61 62 63 64 65 66 67 68 | * @param socket The socket which could not accept a connection * @param errNo The errno for the error * @return An initialized accept failed exception */ - initWithSocket: (id)socket errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFAddressTranslationFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#import "OFException.h"
#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif
/*!
* @class OFAddressTranslationFailedException \
* OFAddressTranslationFailedException.h \
* ObjFW/OFAddressTranslationFailedException.h
*
* @brief An exception indicating the translation of an address failed.
*/
@interface OFAddressTranslationFailedException: OFException
{
OFString *_host;
int _error;
}
/*!
* The host for which the address translation was requested.
*/
| > > | | | | | > > | 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 68 |
#import "OFException.h"
#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFAddressTranslationFailedException \
* OFAddressTranslationFailedException.h \
* ObjFW/OFAddressTranslationFailedException.h
*
* @brief An exception indicating the translation of an address failed.
*/
@interface OFAddressTranslationFailedException: OFException
{
OFString *_host;
int _error;
}
/*!
* The host for which the address translation was requested.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *host;
/*!
* @brief Creates a new, autoreleased address translation failed exception.
*
* @param host The host for which translation was requested
* @return A new, autoreleased address translation failed exception
*/
+ (instancetype)exceptionWithHost: (nullable OFString*)host;
+ (instancetype)exceptionWithHost: (nullable OFString*)host
error: (int)error;
+ (instancetype)exceptionWithError: (int)error;
/*!
* @brief Initializes an already allocated address translation failed exception.
*
* @param host The host for which translation was requested
* @return An initialized address translation failed exception
*/
- initWithHost: (nullable OFString*)host;
- (instancetype)initWithHost: (nullable OFString*)host
error: (int)error;
- (instancetype)initWithError: (int)error;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFAddressTranslationFailedException.m.
| ︙ | ︙ | |||
37 38 39 40 41 42 43 |
#if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS)
+ (void)initialize
{
if (self != [OFAddressTranslationFailedException class])
return;
if (!of_mutex_new(&mutex))
| | > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
#if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS)
+ (void)initialize
{
if (self != [OFAddressTranslationFailedException class])
return;
if (!of_mutex_new(&mutex))
@throw [OFInitializationFailedException
exceptionWithClass: class];
}
#endif
+ (instancetype)exceptionWithHost: (OFString*)host
{
return [[[self alloc] initWithHost: host] autorelease];
}
|
| ︙ | ︙ |
Changes to src/exceptions/OFAllocFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFObject.h" @class OFString; /*! * @class OFAllocFailedException \ * OFAllocFailedException.h ObjFW/OFAllocFailedException.h * * @brief An exception indicating an object could not be allocated. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN @class OFString; /*! * @class OFAllocFailedException \ * OFAllocFailedException.h ObjFW/OFAllocFailedException.h * * @brief An exception indicating an object could not be allocated. |
| ︙ | ︙ | |||
37 38 39 40 41 42 43 | /*! * @brief Returns a description of the exception. * * @return A description of the exception */ - (OFString*)description; @end | > > | 39 40 41 42 43 44 45 46 47 | /*! * @brief Returns a description of the exception. * * @return A description of the exception */ - (OFString*)description; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFAlreadyConnectedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#import "OFException.h"
#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif
/*!
* @class OFAlreadyConnectedException \
* OFAlreadyConnectedException.h ObjFW/OFAlreadyConnectedException.h
*
* @brief An exception indicating an attempt to connect or bind an already
* connected or bound socket.
*/
@interface OFAlreadyConnectedException: OFException
{
id _socket;
}
/*!
* The socket which is already connected.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFAlreadyConnectedException \
* OFAlreadyConnectedException.h ObjFW/OFAlreadyConnectedException.h
*
* @brief An exception indicating an attempt to connect or bind an already
* connected or bound socket.
*/
@interface OFAlreadyConnectedException: OFException
{
id _socket;
}
/*!
* The socket which is already connected.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id socket;
/*!
* @brief Creates a new, autoreleased already connected exception.
*
* @param socket The socket which is already connected
* @return A new, autoreleased already connected exception
*/
+ (instancetype)exceptionWithSocket: (nullable id)socket;
/*!
* @brief Initializes an already allocated already connected exception.
*
* @param socket The socket which is already connected
* @return An initialized already connected exception
*/
- initWithSocket: (nullable id)socket;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFBindFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif /*! * @class OFBindFailedException \ * OFBindFailedException.h ObjFW/OFBindFailedException.h * * @brief An exception indicating that binding a socket failed. */ @interface OFBindFailedException: OFException | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN /*! * @class OFBindFailedException \ * OFBindFailedException.h ObjFW/OFBindFailedException.h * * @brief An exception indicating that binding a socket failed. */ @interface OFBindFailedException: OFException |
| ︙ | ︙ | |||
78 79 80 81 82 83 84 | * @return An initialized bind failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; @end | > > | 80 81 82 83 84 85 86 87 88 | * @return An initialized bind failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFChangeCurrentDirectoryPathFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFChangeCurrentDirectoryPathFailedException \ * OFChangeCurrentDirectoryPathFailedException.h \ * ObjFW/OFChangeCurrentDirectoryPathFailedException.h * * @brief An exception indicating that changing the current directory path * failed. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFChangeCurrentDirectoryPathFailedException \ * OFChangeCurrentDirectoryPathFailedException.h \ * ObjFW/OFChangeCurrentDirectoryPathFailedException.h * * @brief An exception indicating that changing the current directory path * failed. |
| ︙ | ︙ | |||
59 60 61 62 63 64 65 | * changed * @param errNo The errno of the error that occurred * @return An initialized change current directory path failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end | > > | 61 62 63 64 65 66 67 68 69 | * changed * @param errNo The errno of the error that occurred * @return An initialized change current directory path failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFChangeOwnerFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 | * 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. */ #import "OFException.h" | > | | | | | | | | > | 12 13 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
* 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.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFChangeOwnerFailedException \
* OFChangeOwnerFailedException.h ObjFW/OFChangeOwnerFailedException.h
*
* @brief An exception indicating that changing the owner of an item failed.
*/
@interface OFChangeOwnerFailedException: OFException
{
OFString *_path, *_owner, *_group;
int _errNo;
}
/*!
* The path of the item.
*/
@property (readonly, nonatomic) OFString *path;
/*!
* The new owner for the item.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *owner;
/*!
* The new group for the item.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *group;
/*!
* The errno of the error that occurred.
*/
@property (readonly) int errNo;
/*!
* @brief Creates a new, autoreleased change owner failed exception.
*
* @param path The path of the item
* @param owner The new owner for the item
* @param group The new group for the item
* @param errNo The errno of the error that occurred
* @return A new, autoreleased change owner failed exception
*/
+ (instancetype)exceptionWithPath: (OFString*)path
owner: (nullable OFString*)owner
group: (nullable OFString*)group
errNo: (int)errNo;
/*!
* @brief Initializes an already allocated change owner failed exception.
*
* @param path The path of the item
* @param owner The new owner for the item
* @param group The new group for the item
* @param errNo The errno of the error that occurred
* @return An initialized change owner failed exception
*/
- initWithPath: (OFString*)path
owner: (nullable OFString*)owner
group: (nullable OFString*)group
errNo: (int)errNo;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFChangeOwnerFailedException.m.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #include "config.h" #import "OFChangeOwnerFailedException.h" #import "OFString.h" | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | */ #include "config.h" #import "OFChangeOwnerFailedException.h" #import "OFString.h" @implementation OFChangeOwnerFailedException @synthesize path = _path, owner = _owner, group = _group, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group errNo: (int)errNo |
| ︙ | ︙ | |||
80 81 82 83 84 85 86 | _path, _group, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to change owner of item at path %@ to %@:%@: %@", _path, _owner, _group, of_strerror(_errNo)]; } @end | < | 79 80 81 82 83 84 85 | _path, _group, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to change owner of item at path %@ to %@:%@: %@", _path, _owner, _group, of_strerror(_errNo)]; } @end |
Changes to src/exceptions/OFChangePermissionsFailedException.h.
| ︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * file. */ #include <sys/types.h> #import "OFException.h" /*! * @class OFChangePermissionsFailedException \ * OFChangePermissionsFailedException.h \ * ObjFW/OFChangePermissionsFailedException.h * * @brief An exception indicating that changing the permissions of an item * failed. | > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #include <sys/types.h> #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFChangePermissionsFailedException \ * OFChangePermissionsFailedException.h \ * ObjFW/OFChangePermissionsFailedException.h * * @brief An exception indicating that changing the permissions of an item * failed. |
| ︙ | ︙ | |||
68 69 70 71 72 73 74 | * @param errNo The errno of the error that occurred * @return An initialized change permissions failed exception */ - initWithPath: (OFString*)path permissions: (mode_t)permissions errNo: (int)errNo; @end | > > | 70 71 72 73 74 75 76 77 78 | * @param errNo The errno of the error that occurred * @return An initialized change permissions failed exception */ - initWithPath: (OFString*)path permissions: (mode_t)permissions errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFChecksumFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFException.h" /*! * @class OFChecksumFailedException \ * OFChecksumFailedException.h ObjFW/OFChecksumFailedException.h * * @brief An exception indicating that a checksum did not match. */ @interface OFChecksumFailedException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFChecksumFailedException \ * OFChecksumFailedException.h ObjFW/OFChecksumFailedException.h * * @brief An exception indicating that a checksum did not match. */ @interface OFChecksumFailedException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFConditionBroadcastFailedException.h.
| ︙ | ︙ | |||
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"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFCondition;
/*!
* @class OFConditionBroadcastFailedException \
* OFConditionBroadcastFailedException.h \
* ObjFW/OFConditionBroadcastFailedException.h
*
* @brief An exception indicating broadcasting a condition failed.
*/
@interface OFConditionBroadcastFailedException: OFException
{
OFCondition *_condition;
}
/*!
* The condition which could not be broadcasted.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFCondition;
/*!
* @class OFConditionBroadcastFailedException \
* OFConditionBroadcastFailedException.h \
* ObjFW/OFConditionBroadcastFailedException.h
*
* @brief An exception indicating broadcasting a condition failed.
*/
@interface OFConditionBroadcastFailedException: OFException
{
OFCondition *_condition;
}
/*!
* The condition which could not be broadcasted.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFCondition *condition;
/*!
* @brief Returns a new, autoreleased condition broadcast failed exception.
*
* @param condition The condition which could not be broadcasted
* @return A new, autoreleased condition broadcast failed exception
*/
+ (instancetype)exceptionWithCondition: (nullable OFCondition*)condition;
/*!
* @brief Initializes an already allocated condition broadcast failed exception.
*
* @param condition The condition which could not be broadcasted
* @return An initialized condition broadcast failed exception
*/
- initWithCondition: (nullable OFCondition*)condition;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFConditionBroadcastFailedException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
| < < < < < > | | > > > | 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 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- initWithCondition: (OFCondition*)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
- (void)dealloc
{
[_condition release];
[super dealloc];
}
- (OFString*)description
{
if (_condition != nil)
return [OFString stringWithFormat:
@"Broadcasting a condition of type %@ failed!",
[_condition class]];
else
return @"Broadcasting a condition failed!";
}
@end
|
Changes to src/exceptions/OFConditionSignalFailedException.h.
| ︙ | ︙ | |||
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"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFCondition;
/*!
* @class OFConditionSignalFailedException \
* OFConditionSignalFailedException.h \
* ObjFW/OFConditionSignalFailedException.h
*
* @brief An exception indicating signaling a condition failed.
*/
@interface OFConditionSignalFailedException: OFException
{
OFCondition *_condition;
}
/*!
* The condition which could not be signaled.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFCondition;
/*!
* @class OFConditionSignalFailedException \
* OFConditionSignalFailedException.h \
* ObjFW/OFConditionSignalFailedException.h
*
* @brief An exception indicating signaling a condition failed.
*/
@interface OFConditionSignalFailedException: OFException
{
OFCondition *_condition;
}
/*!
* The condition which could not be signaled.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFCondition *condition;
/*!
* @brief Creates a new, autoreleased condition signal failed exception.
*
* @param condition The condition which could not be signaled
* @return A new, autoreleased condition signal failed exception
*/
+ (instancetype)exceptionWithCondition: (nullable OFCondition*)condition;
/*!
* @brief Initializes an already allocated condition signal failed exception.
*
* @param condition The condition which could not be signaled
* @return An initialized condition signal failed exception
*/
- initWithCondition: (nullable OFCondition*)condition;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFConditionSignalFailedException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
| < < < < < > | | > > > | 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 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- initWithCondition: (OFCondition*)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
- (void)dealloc
{
[_condition release];
[super dealloc];
}
- (OFString*)description
{
if (_condition != nil)
return [OFString stringWithFormat:
@"Signaling a condition of type %@ failed!",
[_condition class]];
else
return @"Signaling a condition failed!";
}
@end
|
Changes to src/exceptions/OFConditionStillWaitingException.h.
| ︙ | ︙ | |||
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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFCondition;
/*!
* @class OFConditionStillWaitingException \
* OFConditionStillWaitingException.h \
* ObjFW/OFConditionStillWaitingException.h
*
* @brief An exception indicating that a thread is still waiting for a
* condition.
*/
@interface OFConditionStillWaitingException: OFException
{
OFCondition *_condition;
}
/*!
* The condition for which is still being waited.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFCondition;
/*!
* @class OFConditionStillWaitingException \
* OFConditionStillWaitingException.h \
* ObjFW/OFConditionStillWaitingException.h
*
* @brief An exception indicating that a thread is still waiting for a
* condition.
*/
@interface OFConditionStillWaitingException: OFException
{
OFCondition *_condition;
}
/*!
* The condition for which is still being waited.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFCondition *condition;
/*!
* @brief Creates a new, autoreleased condition still waiting exception.
*
* @param condition The condition for which is still being waited
* @return A new, autoreleased condition still waiting exception
*/
+ (instancetype)exceptionWithCondition: (nullable OFCondition*)condition;
/*!
* @brief Initializes an already allocated condition still waiting exception.
*
* @param condition The condition for which is still being waited
* @return An initialized condition still waiting exception
*/
- initWithCondition: (nullable OFCondition*)condition;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFConditionStillWaitingException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
| < < < < < > | | > > > > | | 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 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- initWithCondition: (OFCondition*)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
- (void)dealloc
{
[_condition release];
[super dealloc];
}
- (OFString*)description
{
if (_condition != nil)
return [OFString stringWithFormat:
@"Deallocation of a condition of type %@ was tried, even "
"though a thread was still waiting for it!",
[_condition class]];
else
return @"Deallocation of a condition was tried, even though a "
"thread was still waiting for it!";
}
@end
|
Changes to src/exceptions/OFConditionWaitFailedException.h.
| ︙ | ︙ | |||
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"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFCondition;
/*!
* @class OFConditionWaitFailedException \
* OFConditionWaitFailedException.h \
* ObjFW/OFConditionWaitFailedException.h
*
* @brief An exception indicating waiting for a condition failed.
*/
@interface OFConditionWaitFailedException: OFException
{
OFCondition *_condition;
}
/*!
* The condition for which could not be waited.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFCondition;
/*!
* @class OFConditionWaitFailedException \
* OFConditionWaitFailedException.h \
* ObjFW/OFConditionWaitFailedException.h
*
* @brief An exception indicating waiting for a condition failed.
*/
@interface OFConditionWaitFailedException: OFException
{
OFCondition *_condition;
}
/*!
* The condition for which could not be waited.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFCondition *condition;
/*!
* @brief Creates a new, autoreleased condition wait failed exception.
*
* @param condition The condition for which could not be waited
* @return A new, autoreleased condition wait failed exception
*/
+ (instancetype)exceptionWithCondition: (nullable OFCondition*)condition;
/*!
* @brief Initializes an already allocated condition wait failed exception.
*
* @param condition The condition for which could not be waited
* @return An initialized condition wait failed exception
*/
- initWithCondition: (nullable OFCondition*)condition;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFConditionWaitFailedException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
| < < < < < > | | > > > | 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 |
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- initWithCondition: (OFCondition*)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
- (void)dealloc
{
[_condition release];
[super dealloc];
}
- (OFString*)description
{
if (_condition != nil)
return [OFString stringWithFormat:
@"Waiting for a condition of type %@ failed!",
[_condition class]];
else
return @"Waiting for a condition failed!";
}
@end
|
Changes to src/exceptions/OFConnectionFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif /*! * @class OFConnectionFailedException \ * OFConnectionFailedException.h ObjFW/OFConnectionFailedException.h * * @brief An exception indicating that a connection could not be established. */ @interface OFConnectionFailedException: OFException | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN /*! * @class OFConnectionFailedException \ * OFConnectionFailedException.h ObjFW/OFConnectionFailedException.h * * @brief An exception indicating that a connection could not be established. */ @interface OFConnectionFailedException: OFException |
| ︙ | ︙ | |||
102 103 104 105 106 107 108 | * @return An initialized connection failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; @end | > > | 104 105 106 107 108 109 110 111 112 | * @return An initialized connection failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFCopyItemFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFCopyItemFailedException \ * OFCopyItemFailedException.h ObjFW/OFCopyItemFailedException.h * * @brief An exception indicating that copying a item failed. */ @interface OFCopyItemFailedException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFCopyItemFailedException \ * OFCopyItemFailedException.h ObjFW/OFCopyItemFailedException.h * * @brief An exception indicating that copying a item failed. */ @interface OFCopyItemFailedException: OFException |
| ︙ | ︙ | |||
63 64 65 66 67 68 69 |
* @param errNo The errno of the error that occurred
* @return An initialized copy item failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
| > > | 65 66 67 68 69 70 71 72 73 |
* @param errNo The errno of the error that occurred
* @return An initialized copy item failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFCreateDirectoryFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFCreateDirectoryFailedException \ * OFCreateDirectoryFailedException.h \ * ObjFW/OFCreateDirectoryFailedException.h * * @brief An exception indicating a directory couldn't be created. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFCreateDirectoryFailedException \ * OFCreateDirectoryFailedException.h \ * ObjFW/OFCreateDirectoryFailedException.h * * @brief An exception indicating a directory couldn't be created. */ |
| ︙ | ︙ | |||
57 58 59 60 61 62 63 | * created * @param errNo The errno of the error that occurred * @return An initialized create directory failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end | > > | 59 60 61 62 63 64 65 66 67 | * created * @param errNo The errno of the error that occurred * @return An initialized create directory failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFCreateSymbolicLinkFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 | * 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. */ #import "OFException.h" | > | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFCreateSymbolicLinkFailedException \ * OFCreateSymbolicLinkFailedException.h \ * ObjFW/OFCreateSymbolicLinkFailedException.h * * @brief An exception indicating that creating a symbolic link failed. */ |
| ︙ | ︙ | |||
87 88 89 90 91 92 93 |
* @param errNo The errno of the error that occurred
* @return An initialized create symbolic link failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
| | > | 88 89 90 91 92 93 94 95 96 |
* @param errNo The errno of the error that occurred
* @return An initialized create symbolic link failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFCreateSymbolicLinkFailedException.m.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #include "config.h" #import "OFCreateSymbolicLinkFailedException.h" #import "OFString.h" | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
*/
#include "config.h"
#import "OFCreateSymbolicLinkFailedException.h"
#import "OFString.h"
@implementation OFCreateSymbolicLinkFailedException
@synthesize sourcePath = _sourcePath, destinationPath = _destinationPath;
@synthesize errNo = _errNo;
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
{
|
| ︙ | ︙ | |||
96 97 98 99 100 101 102 | of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to create symbolic link %@ with destination %@!", _destinationPath, _sourcePath]; } @end | < | 95 96 97 98 99 100 101 | of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to create symbolic link %@ with destination %@!", _destinationPath, _sourcePath]; } @end |
Changes to src/exceptions/OFEnumerationMutationException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFEnumerationMutationException \ * OFEnumerationMutationException.h \ * ObjFW/OFEnumerationMutationException.h * * @brief An exception indicating that a mutation was detected during * enumeration. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFEnumerationMutationException \ * OFEnumerationMutationException.h \ * ObjFW/OFEnumerationMutationException.h * * @brief An exception indicating that a mutation was detected during * enumeration. |
| ︙ | ︙ | |||
46 47 48 49 50 51 52 | * @brief Initializes an already allocated enumeration mutation exception. * * @param object The object which was mutated during enumeration * @return An initialized enumeration mutation exception */ - initWithObject: (id)object; @end | > > | 48 49 50 51 52 53 54 55 56 | * @brief Initializes an already allocated enumeration mutation exception. * * @param object The object which was mutated during enumeration * @return An initialized enumeration mutation exception */ - initWithObject: (id)object; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFObject.h" @class OFString; #ifndef DOXYGEN @class OFArray OF_GENERIC(ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); #endif #define OF_BACKTRACE_SIZE 32 | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN @class OFString; #ifndef DOXYGEN @class OFArray OF_GENERIC(ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); #endif #define OF_BACKTRACE_SIZE 32 |
| ︙ | ︙ | |||
162 163 164 165 166 167 168 | /*! * @brief Returns a backtrace of when the exception was created or nil if no * backtrace is available. * * @return A backtrace of when the exception was created */ | | > > | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
/*!
* @brief Returns a backtrace of when the exception was created or nil if no
* backtrace is available.
*
* @return A backtrace of when the exception was created
*/
- (nullable OFArray*)backtrace;
@end
#ifdef __cplusplus
extern "C" {
#endif
extern OFString* of_strerror(int errNo);
#ifdef __cplusplus
}
#endif
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFGetOptionFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" @class OFStream; /*! * @class OFGetOptionFailedException \ * OFGetOptionFailedException.h ObjFW/OFGetOptionFailedException.h * * @brief An exception indicating that getting an option for a stream failed. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; /*! * @class OFGetOptionFailedException \ * OFGetOptionFailedException.h ObjFW/OFGetOptionFailedException.h * * @brief An exception indicating that getting an option for a stream failed. |
| ︙ | ︙ | |||
56 57 58 59 60 61 62 | * @param stream The stream for which the option could not be gotten * @param errNo The errno of the error that occurred * @return An initialized get option failed exception */ - initWithStream: (OFStream*)stream errNo: (int)errNo; @end | > > | 58 59 60 61 62 63 64 65 66 | * @param stream The stream for which the option could not be gotten * @param errNo The errno of the error that occurred * @return An initialized get option failed exception */ - initWithStream: (OFStream*)stream errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFHTTPRequestFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif @class OFHTTPRequest; @class OFHTTPResponse; /*! * @class OFHTTPRequestFailedException \ * OFHTTPRequestFailedException.h \ * ObjFW/OFHTTPRequestFailedException.h | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN @class OFHTTPRequest; @class OFHTTPResponse; /*! * @class OFHTTPRequestFailedException \ * OFHTTPRequestFailedException.h \ * ObjFW/OFHTTPRequestFailedException.h |
| ︙ | ︙ | |||
62 63 64 65 66 67 68 | * @param request The HTTP request which failed * @param response The response for the failed HTTP request * @return A new HTTP request failed exception */ - initWithRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response; @end | > > | 64 65 66 67 68 69 70 71 72 | * @param request The HTTP request which failed * @param response The response for the failed HTTP request * @return A new HTTP request failed exception */ - initWithRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFHashAlreadyCalculatedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFHashAlreadyCalculatedException \ * OFHashAlreadyCalculatedException.h \ * ObjFW/OFHashAlreadyCalculatedException.h * * @brief An exception indicating that the hash has already been calculated. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFHashAlreadyCalculatedException \ * OFHashAlreadyCalculatedException.h \ * ObjFW/OFHashAlreadyCalculatedException.h * * @brief An exception indicating that the hash has already been calculated. */ |
| ︙ | ︙ | |||
45 46 47 48 49 50 51 | * @brief Initializes an already allocated hash already calculated exception. * * @param object The hash which has already been calculated * @return An initialized hash already calculated exception */ - initWithObject: (id)object; @end | > > | 47 48 49 50 51 52 53 54 55 | * @brief Initializes an already allocated hash already calculated exception. * * @param object The hash which has already been calculated * @return An initialized hash already calculated exception */ - initWithObject: (id)object; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFInitializationFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
* 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.
*/
#import "OFException.h"
/*!
* @class OFInitializationFailedException \
* OFInitializationFailedException.h \
* ObjFW/OFInitializationFailedException.h
*
* @brief An exception indicating that initializing something failed.
*/
@interface OFInitializationFailedException: OFException
{
Class _inClass;
}
/*!
* The class for which initialization failed.
*/
| > > | | | > > | 12 13 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 |
* 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.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFInitializationFailedException \
* OFInitializationFailedException.h \
* ObjFW/OFInitializationFailedException.h
*
* @brief An exception indicating that initializing something failed.
*/
@interface OFInitializationFailedException: OFException
{
Class _inClass;
}
/*!
* The class for which initialization failed.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) Class inClass;
/*!
* @brief Creates a new, autoreleased initialization failed exception.
*
* @param class_ The class for which initialization failed
* @return A new, autoreleased initialization failed exception
*/
+ (instancetype)exceptionWithClass: (nullable Class)class_;
/*!
* @brief Initializes an already allocated initialization failed exception.
*
* @param class_ The class for which initialization failed
* @return An initialized initialization failed exception
*/
- initWithClass: (nullable Class)class_;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFInitializationFailedException.m.
| ︙ | ︙ | |||
23 24 25 26 27 28 29 |
@synthesize inClass = _inClass;
+ (instancetype)exceptionWithClass: (Class)class
{
return [[[self alloc] initWithClass: class] autorelease];
}
| < < < < < > | | > > | 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 |
@synthesize inClass = _inClass;
+ (instancetype)exceptionWithClass: (Class)class
{
return [[[self alloc] initWithClass: class] autorelease];
}
- initWithClass: (Class)class
{
self = [super init];
_inClass = class;
return self;
}
- (OFString*)description
{
if (_inClass != Nil)
return [OFString stringWithFormat:
@"Initialization failed for or in class %@!", _inClass];
else
return @"Initialization failed!";
}
@end
|
Changes to src/exceptions/OFInvalidArgumentException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFException.h" /*! * @class OFInvalidArgumentException \ * OFInvalidArgumentException.h ObjFW/OFInvalidArgumentException.h * * @brief An exception indicating that the argument is invalid for this method. */ @interface OFInvalidArgumentException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFInvalidArgumentException \ * OFInvalidArgumentException.h ObjFW/OFInvalidArgumentException.h * * @brief An exception indicating that the argument is invalid for this method. */ @interface OFInvalidArgumentException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFInvalidEncodingException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFException.h" /*! * @class OFInvalidEncodingException \ * OFInvalidEncodingException.h ObjFW/OFInvalidEncodingException.h * * @brief An exception indicating that the encoding is invalid for this object. */ @interface OFInvalidEncodingException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFInvalidEncodingException \ * OFInvalidEncodingException.h ObjFW/OFInvalidEncodingException.h * * @brief An exception indicating that the encoding is invalid for this object. */ @interface OFInvalidEncodingException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFInvalidFormatException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFException.h" /*! * @class OFInvalidFormatException \ * OFInvalidFormatException.h ObjFW/OFInvalidFormatException.h * * @brief An exception indicating that the format is invalid. */ @interface OFInvalidFormatException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFInvalidFormatException \ * OFInvalidFormatException.h ObjFW/OFInvalidFormatException.h * * @brief An exception indicating that the format is invalid. */ @interface OFInvalidFormatException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFInvalidJSONException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFInvalidJSONException \ * OFInvalidJSONException.h ObjFW/OFInvalidJSONException.h * * @brief An exception indicating a JSON representation is invalid. */ @interface OFInvalidJSONException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFInvalidJSONException \ * OFInvalidJSONException.h ObjFW/OFInvalidJSONException.h * * @brief An exception indicating a JSON representation is invalid. */ @interface OFInvalidJSONException: OFException |
| ︙ | ︙ | |||
54 55 56 57 58 59 60 | * @param string The string containing the invalid JSON representation * @param line The line in which the parsing error was encountered * @return An initialized invalid JSON exception */ - initWithString: (OFString*)string line: (size_t)line; @end | > > | 56 57 58 59 60 61 62 63 64 | * @param string The string containing the invalid JSON representation * @param line The line in which the parsing error was encountered * @return An initialized invalid JSON exception */ - initWithString: (OFString*)string line: (size_t)line; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFInvalidServerReplyException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFException.h" /*! * @class OFInvalidServerReplyException \ * OFInvalidServerReplyException.h ObjFW/OFInvalidServerReplyException.h * * @brief An exception indicating that the server sent an invalid reply. */ @interface OFInvalidServerReplyException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFInvalidServerReplyException \ * OFInvalidServerReplyException.h ObjFW/OFInvalidServerReplyException.h * * @brief An exception indicating that the server sent an invalid reply. */ @interface OFInvalidServerReplyException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFLinkFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 | * 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. */ #import "OFException.h" | > | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFLinkFailedException \ * OFLinkFailedException.h ObjFW/OFLinkFailedException.h * * @brief An exception indicating that creating a link failed. */ @interface OFLinkFailedException: OFException |
| ︙ | ︙ | |||
84 85 86 87 88 89 90 |
* @param errNo The errno of the error that occurred
* @return An initialized link failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
| | > | 85 86 87 88 89 90 91 92 93 |
* @param errNo The errno of the error that occurred
* @return An initialized link failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFLinkFailedException.m.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #include "config.h" #import "OFLinkFailedException.h" #import "OFString.h" | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
*/
#include "config.h"
#import "OFLinkFailedException.h"
#import "OFString.h"
@implementation OFLinkFailedException
@synthesize sourcePath = _sourcePath, destinationPath = _destinationPath;
@synthesize errNo = _errNo;
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
{
|
| ︙ | ︙ | |||
95 96 97 98 99 100 101 | _sourcePath, _destinationPath, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to link file %@ to %@!", _sourcePath, _destinationPath]; } @end | < | 94 95 96 97 98 99 100 | _sourcePath, _destinationPath, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to link file %@ to %@!", _sourcePath, _destinationPath]; } @end |
Changes to src/exceptions/OFListenFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif /*! * @class OFListenFailedException \ * OFListenFailedException.h ObjFW/OFListenFailedException.h * * @brief An exception indicating that listening on the socket failed. */ @interface OFListenFailedException: OFException | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN /*! * @class OFListenFailedException \ * OFListenFailedException.h ObjFW/OFListenFailedException.h * * @brief An exception indicating that listening on the socket failed. */ @interface OFListenFailedException: OFException |
| ︙ | ︙ | |||
67 68 69 70 71 72 73 | * @param errNo The errno of the error that occurred * @return An initialized listen failed exception */ - initWithSocket: (id)socket backLog: (int)backLog errNo: (int)errNo; @end | > > | 69 70 71 72 73 74 75 76 77 | * @param errNo The errno of the error that occurred * @return An initialized listen failed exception */ - initWithSocket: (id)socket backLog: (int)backLog errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFLockFailedException.h.
| ︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#import "OFLocking.h"
/*!
* @class OFLockFailedException \
* OFLockFailedException.h ObjFW/OFLockFailedException.h
*
* @brief An exception indicating that locking a lock failed.
*/
@interface OFLockFailedException: OFException
{
id <OFLocking> _lock;
}
/*!
* The lock which could not be locked.
*/
| > > | | | > > | 13 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 |
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#import "OFLocking.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFLockFailedException \
* OFLockFailedException.h ObjFW/OFLockFailedException.h
*
* @brief An exception indicating that locking a lock failed.
*/
@interface OFLockFailedException: OFException
{
id <OFLocking> _lock;
}
/*!
* The lock which could not be locked.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id <OFLocking> lock;
/*!
* @brief Creates a new, autoreleased lock failed exception.
*
* @param lock The lock which could not be locked
* @return A new, autoreleased lock failed exception
*/
+ (instancetype)exceptionWithLock: (nullable id <OFLocking>)lock;
/*!
* @brief Initializes an already allocated lock failed exception.
*
* @param lock The lock which could not be locked
* @return An initialized lock failed exception
*/
- initWithLock: (nullable id <OFLocking>)lock;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFMalformedXMLException.h.
| ︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
* file.
*/
#import "OFException.h"
@class OFXMLParser;
/*!
* @class OFMalformedXMLException \
* OFMalformedXMLException.h ObjFW/OFMalformedXMLException.h
*
* @brief An exception indicating that a parser encountered malformed XML.
*/
@interface OFMalformedXMLException: OFException
{
OFXMLParser *_parser;
}
/*!
* The parser which encountered malformed XML.
*/
| > > | | | > > | 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 |
* file.
*/
#import "OFException.h"
@class OFXMLParser;
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFMalformedXMLException \
* OFMalformedXMLException.h ObjFW/OFMalformedXMLException.h
*
* @brief An exception indicating that a parser encountered malformed XML.
*/
@interface OFMalformedXMLException: OFException
{
OFXMLParser *_parser;
}
/*!
* The parser which encountered malformed XML.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFXMLParser *parser;
/*!
* @brief Creates a new, autoreleased malformed XML exception.
*
* @param parser The parser which encountered malformed XML
* @return A new, autoreleased malformed XML exception
*/
+ (instancetype)exceptionWithParser: (nullable OFXMLParser*)parser;
/*!
* @brief Initializes an already allocated malformed XML exception.
*
* @param parser The parser which encountered malformed XML
* @return An initialized malformed XML exception
*/
- initWithParser: (nullable OFXMLParser*)parser;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFMemoryNotPartOfObjectException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFMemoryNotPartOfObjectException \ * OFMemoryNotPartOfObjectException.h \ * ObjFW/OFMemoryNotPartOfObjectException.h * * @brief An exception indicating the given memory is not part of the object. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFMemoryNotPartOfObjectException \ * OFMemoryNotPartOfObjectException.h \ * ObjFW/OFMemoryNotPartOfObjectException.h * * @brief An exception indicating the given memory is not part of the object. */ |
| ︙ | ︙ | |||
55 56 57 58 59 60 61 | * @param pointer A pointer to the memory that is not part of the object * @param object The object which the memory is not part of * @return An initialized memory not part of object exception */ - initWithPointer: (void*)pointer object: (id)object; @end | > > | 57 58 59 60 61 62 63 64 65 | * @param pointer A pointer to the memory that is not part of the object * @param object The object which the memory is not part of * @return An initialized memory not part of object exception */ - initWithPointer: (void*)pointer object: (id)object; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFMoveItemFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFMoveItemFailedException \ * OFMoveItemFailedException.h ObjFW/OFMoveItemFailedException.h * * @brief An exception indicating that moving an item failed. */ @interface OFMoveItemFailedException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFMoveItemFailedException \ * OFMoveItemFailedException.h ObjFW/OFMoveItemFailedException.h * * @brief An exception indicating that moving an item failed. */ @interface OFMoveItemFailedException: OFException |
| ︙ | ︙ | |||
63 64 65 66 67 68 69 |
* @param errNo The errno of the error that occurred
* @return An initialized move item failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
| > > | 65 66 67 68 69 70 71 72 73 |
* @param errNo The errno of the error that occurred
* @return An initialized move item failed exception
*/
- initWithSourcePath: (OFString*)sourcePath
destinationPath: (OFString*)destinationPath
errNo: (int)errNo;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFNotImplementedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFNotImplementedException \ * OFNotImplementedException.h ObjFW/OFNotImplementedException.h * * @brief An exception indicating that a method or part of it is not * implemented. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFNotImplementedException \ * OFNotImplementedException.h ObjFW/OFNotImplementedException.h * * @brief An exception indicating that a method or part of it is not * implemented. */ |
| ︙ | ︙ | |||
55 56 57 58 59 60 61 | * @param selector The selector which is not or not fully implemented * @param object The object which does not (fully) implement the selector * @return An initialized not implemented exception */ - initWithSelector: (SEL)selector object: (id)object; @end | > > | 57 58 59 60 61 62 63 64 65 | * @param selector The selector which is not or not fully implemented * @param object The object which does not (fully) implement the selector * @return An initialized not implemented exception */ - initWithSelector: (SEL)selector object: (id)object; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFNotOpenException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
* 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.
*/
#import "OFException.h"
/*!
* @class OFNotOpenException OFNotOpenException.h ObjFW/OFNotOpenException.h
*
* @brief An exception indicating an object is not open, connected or bound.
*/
@interface OFNotOpenException: OFException
{
| > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
* 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.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFNotOpenException OFNotOpenException.h ObjFW/OFNotOpenException.h
*
* @brief An exception indicating an object is not open, connected or bound.
*/
@interface OFNotOpenException: OFException
{
|
| ︙ | ︙ | |||
43 44 45 46 47 48 49 | * @brief Initializes an already allocated not open exception. * * @param object The object which is not open, connected or bound * @return An initialized not open exception */ - initWithObject: (id)object; @end | > > | 45 46 47 48 49 50 51 52 53 | * @brief Initializes an already allocated not open exception. * * @param object The object which is not open, connected or bound * @return An initialized not open exception */ - initWithObject: (id)object; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFObserveFailedException.h.
| ︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #import "OFException.h" @class OFKernelEventObserver; /*! * @class OFObserveFailedException \ * OFObserveFailedException.h ObjFW/OFObserveFailedException.h * | > > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFKernelEventObserver; /*! * @class OFObserveFailedException \ * OFObserveFailedException.h ObjFW/OFObserveFailedException.h * |
| ︙ | ︙ | |||
56 57 58 59 60 61 62 | * @param observer The observer which failed to observe * @param errNo The errno of the error that occurred * @return An initialized observe failed exception */ - initWithObserver: (OFKernelEventObserver*)observer errNo: (int)errNo; @end | > > | 58 59 60 61 62 63 64 65 66 | * @param observer The observer which failed to observe * @param errNo The errno of the error that occurred * @return An initialized observe failed exception */ - initWithObserver: (OFKernelEventObserver*)observer errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFOpenItemFailedException.h.
| ︙ | ︙ | |||
12 13 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 |
* 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.
*/
#import "OFException.h"
/*!
* @class OFOpenItemFailedException \
* OFOpenItemFailedException.h ObjFW/OFOpenItemFailedException.h
*
* @brief An exception indicating an item could not be opened.
*/
@interface OFOpenItemFailedException: OFException
{
OFString *_path, *_mode;
int _errNo;
}
/*!
* The path of the item which could not be opened.
*/
@property (readonly, nonatomic) OFString *path;
/*!
* The mode in which the item should have been opened.
*/
| > > | | 12 13 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 |
* 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.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFOpenItemFailedException \
* OFOpenItemFailedException.h ObjFW/OFOpenItemFailedException.h
*
* @brief An exception indicating an item could not be opened.
*/
@interface OFOpenItemFailedException: OFException
{
OFString *_path, *_mode;
int _errNo;
}
/*!
* The path of the item which could not be opened.
*/
@property (readonly, nonatomic) OFString *path;
/*!
* The mode in which the item should have been opened.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *mode;
/*!
* The errno of the error that occurred.
*/
@property (readonly) int errNo;
/*!
|
| ︙ | ︙ | |||
55 56 57 58 59 60 61 | * @brief Creates a new, autoreleased open item failed exception. * * @param path A string with the path of the item tried to open * @param mode A string with the mode in which the item should have been opened * @return A new, autoreleased open item failed exception */ + (instancetype)exceptionWithPath: (OFString*)path | | | | | > > | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | * @brief Creates a new, autoreleased open item failed exception. * * @param path A string with the path of the item tried to open * @param mode A string with the mode in which the item should have been opened * @return A new, autoreleased open item failed exception */ + (instancetype)exceptionWithPath: (OFString*)path mode: (nullable OFString*)mode; /*! * @brief Creates a new, autoreleased open item failed exception. * * @param path A string with the path of the item tried to open * @param errNo The errno of the error that occurred * @return A new, autoreleased open item failed exception */ + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo; /*! * @brief Creates a new, autoreleased open item failed exception. * * @param path A string with the path of the item tried to open * @param mode A string with the mode in which the item should have been opened * @param errNo The errno of the error that occurred * @return A new, autoreleased open item failed exception */ + (instancetype)exceptionWithPath: (OFString*)path mode: (nullable OFString*)mode errNo: (int)errNo; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @return An initialized open item failed exception */ - initWithPath: (OFString*)path; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @param mode A string with the mode in which the item should have been opened * @return An initialized open item failed exception */ - initWithPath: (OFString*)path mode: (nullable OFString*)mode; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @param errNo The errno of the error that occurred * @return An initialized open item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @param mode A string with the mode in which the item should have been opened * @param errNo The errno of the error that occurred * @return An initialized open item failed exception */ - initWithPath: (OFString*)path mode: (nullable OFString*)mode errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFOutOfMemoryException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFOutOfMemoryException \ * OFOutOfMemoryException.h ObjFW/OFOutOfMemoryException.h * * @brief An exception indicating there is not enough memory available. */ @interface OFOutOfMemoryException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFOutOfMemoryException \ * OFOutOfMemoryException.h ObjFW/OFOutOfMemoryException.h * * @brief An exception indicating there is not enough memory available. */ @interface OFOutOfMemoryException: OFException |
| ︙ | ︙ | |||
44 45 46 47 48 49 50 | * @brief Initializes an already allocated no memory exception. * * @param requestedSize The size of the memory that could not be allocated * @return An initialized no memory exception */ - initWithRequestedSize: (size_t)requestedSize; @end | > > | 46 47 48 49 50 51 52 53 54 | * @brief Initializes an already allocated no memory exception. * * @param requestedSize The size of the memory that could not be allocated * @return An initialized no memory exception */ - initWithRequestedSize: (size_t)requestedSize; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFOutOfRangeException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFException.h" /*! * @class OFOutOfRangeException \ * OFOutOfRangeException.h ObjFW/OFOutOfRangeException.h * * @brief An exception indicating the given value is out of range. */ @interface OFOutOfRangeException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFOutOfRangeException \ * OFOutOfRangeException.h ObjFW/OFOutOfRangeException.h * * @brief An exception indicating the given value is out of range. */ @interface OFOutOfRangeException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFReadFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFReadOrWriteFailedException.h" /*! * @class OFReadFailedException \ * OFReadFailedException.h ObjFW/OFReadFailedException.h * * @brief An exception indicating that reading from an object failed. */ @interface OFReadFailedException: OFReadOrWriteFailedException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFReadOrWriteFailedException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFReadFailedException \ * OFReadFailedException.h ObjFW/OFReadFailedException.h * * @brief An exception indicating that reading from an object failed. */ @interface OFReadFailedException: OFReadOrWriteFailedException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFReadOrWriteFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFReadOrWriteFailedException \ * OFReadOrWriteFailedException.h ObjFW/OFReadOrWriteFailedException.h * * @brief An exception indicating that reading from or writing to an object * failed. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFReadOrWriteFailedException \ * OFReadOrWriteFailedException.h ObjFW/OFReadOrWriteFailedException.h * * @brief An exception indicating that reading from or writing to an object * failed. */ |
| ︙ | ︙ | |||
89 90 91 92 93 94 95 | * @param errNo The errno of the error that occurred * @return A new open file failed exception */ - initWithObject: (id)object requestedLength: (size_t)requestedLength errNo: (int)errNo; @end | > > | 91 92 93 94 95 96 97 98 99 | * @param errNo The errno of the error that occurred * @return A new open file failed exception */ - initWithObject: (id)object requestedLength: (size_t)requestedLength errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFRemoveItemFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFRemoveItemFailedException \ * OFRemoveItemFailedException.h ObjFW/OFRemoveItemFailedException.h * * @brief An exception indicating that removing an item failed. */ @interface OFRemoveItemFailedException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFRemoveItemFailedException \ * OFRemoveItemFailedException.h ObjFW/OFRemoveItemFailedException.h * * @brief An exception indicating that removing an item failed. */ @interface OFRemoveItemFailedException: OFException |
| ︙ | ︙ | |||
54 55 56 57 58 59 60 | * @param path The path of the item which could not be removed * @param errNo The errno of the error that occurred * @return An initialized remove item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end | > > | 56 57 58 59 60 61 62 63 64 | * @param path The path of the item which could not be removed * @param errNo The errno of the error that occurred * @return An initialized remove item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFSandboxActivationFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" @class OFSandbox; /*! * @class OFSandboxActivationFailedException \ * OFSandboxActivationFailedException.h \ * ObjFW/OFSandboxActivationFailedException.h * | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFSandbox; /*! * @class OFSandboxActivationFailedException \ * OFSandboxActivationFailedException.h \ * ObjFW/OFSandboxActivationFailedException.h * |
| ︙ | ︙ | |||
57 58 59 60 61 62 63 | * @param sandbox The sandbox which could not be activated * @param errNo The errno of the error that occurred * @return An initialized sandboxing failed exception */ - initWithSandbox: (OFSandbox*)sandbox errNo: (int)errNo; @end | > > | 59 60 61 62 63 64 65 66 67 | * @param sandbox The sandbox which could not be activated * @param errNo The errno of the error that occurred * @return An initialized sandboxing failed exception */ - initWithSandbox: (OFSandbox*)sandbox errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFSeekFailedException.h.
| ︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFException.h" #import "OFSeekableStream.h" /*! * @class OFSeekFailedException \ * OFSeekFailedException.h ObjFW/OFSeekFailedException.h * * @brief An exception indicating that seeking in a stream failed. */ @interface OFSeekFailedException: OFException | > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFException.h" #import "OFSeekableStream.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFSeekFailedException \ * OFSeekFailedException.h ObjFW/OFSeekFailedException.h * * @brief An exception indicating that seeking in a stream failed. */ @interface OFSeekFailedException: OFException |
| ︙ | ︙ | |||
74 75 76 77 78 79 80 | * @return An initialized seek failed exception */ - initWithStream: (OFSeekableStream*)stream offset: (of_offset_t)offset whence: (int)whence errNo: (int)errNo; @end | > > | 76 77 78 79 80 81 82 83 84 | * @return An initialized seek failed exception */ - initWithStream: (OFSeekableStream*)stream offset: (of_offset_t)offset whence: (int)whence errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFSetOptionFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" @class OFStream; /*! * @class OFSetOptionFailedException \ * OFSetOptionFailedException.h ObjFW/OFSetOptionFailedException.h * * @brief An exception indicating that setting an option for a stream failed. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; /*! * @class OFSetOptionFailedException \ * OFSetOptionFailedException.h ObjFW/OFSetOptionFailedException.h * * @brief An exception indicating that setting an option for a stream failed. |
| ︙ | ︙ | |||
56 57 58 59 60 61 62 | * @param stream The stream for which the option could not be set * @param errNo The errno of the error that occurred * @return An initialized set option failed exception */ - initWithStream: (OFStream*)stream errNo: (int)errNo; @end | > > | 58 59 60 61 62 63 64 65 66 | * @param stream The stream for which the option could not be set * @param errNo The errno of the error that occurred * @return An initialized set option failed exception */ - initWithStream: (OFStream*)stream errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFStatItemFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFStatItemFailedException \ * OFStatItemFailedException.h ObjFW/OFStatItemFailedException.h * * @brief An exception indicating an item's status could not be retrieved. */ @interface OFStatItemFailedException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFStatItemFailedException \ * OFStatItemFailedException.h ObjFW/OFStatItemFailedException.h * * @brief An exception indicating an item's status could not be retrieved. */ @interface OFStatItemFailedException: OFException |
| ︙ | ︙ | |||
74 75 76 77 78 79 80 | * retrieved * @param errNo The errno of the error that occurred * @return An initialized stat item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end | > > | 76 77 78 79 80 81 82 83 84 | * retrieved * @param errNo The errno of the error that occurred * @return An initialized stat item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFStillLockedException.h.
| ︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#import "OFLocking.h"
/*!
* @class OFStillLockedException \
* OFStillLockedException.h ObjFW/OFStillLockedException.h
*
* @brief An exception indicating that a lock is still locked.
*/
@interface OFStillLockedException: OFException
{
id <OFLocking> _lock;
}
/*!
* The lock which is still locked.
*/
| > > | | | > > | 13 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 |
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#import "OFLocking.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFStillLockedException \
* OFStillLockedException.h ObjFW/OFStillLockedException.h
*
* @brief An exception indicating that a lock is still locked.
*/
@interface OFStillLockedException: OFException
{
id <OFLocking> _lock;
}
/*!
* The lock which is still locked.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id <OFLocking> lock;
/*!
* @brief Creates a new, autoreleased still locked exception.
*
* @param lock The lock which is still locked
* @return A new, autoreleased still locked exception
*/
+ (instancetype)exceptionWithLock: (nullable id <OFLocking>)lock;
/*!
* @brief Initializes an already allocated still locked exception.
*
* @param lock The lock which is still locked
* @return An initialized still locked exception
*/
- initWithLock: (nullable id <OFLocking>)lock;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFThreadJoinFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFThread;
/*!
* @class OFThreadJoinFailedException \
* OFThreadJoinFailedException.h ObjFW/OFThreadJoinFailedException.h
*
* @brief An exception indicating that joining a thread failed.
*/
@interface OFThreadJoinFailedException: OFException
{
OFThread *_thread;
}
/*!
* The thread which could not be joined.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFThread;
/*!
* @class OFThreadJoinFailedException \
* OFThreadJoinFailedException.h ObjFW/OFThreadJoinFailedException.h
*
* @brief An exception indicating that joining a thread failed.
*/
@interface OFThreadJoinFailedException: OFException
{
OFThread *_thread;
}
/*!
* The thread which could not be joined.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFThread *thread;
/*!
* @brief Creates a new, autoreleased thread join failed exception.
*
* @param thread The thread which could not be joined
* @return A new, autoreleased thread join failed exception
*/
+ (instancetype)exceptionWithThread: (nullable OFThread*)thread;
/*!
* @brief Initializes an already allocated thread join failed exception.
*
* @param thread The thread which could not be joined
* @return An initialized thread join failed exception
*/
- initWithThread: (nullable OFThread*)thread;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFThreadJoinFailedException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
| < < < < < > | | > > > > | | 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 |
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
- initWithThread: (OFThread*)thread
{
self = [super init];
_thread = [thread retain];
return self;
}
- (void)dealloc
{
[_thread release];
[super dealloc];
}
- (OFString*)description
{
if (_thread != nil)
return [OFString stringWithFormat:
@"Joining a thread of type %@ failed! Most likely, another "
@"thread already waits for the thread to join.",
[_thread class]];
else
return @"Joining a thread failed! Most likely, another thread "
@"already waits for the thread to join.";
}
@end
|
Changes to src/exceptions/OFThreadStartFailedException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFThread;
/*!
* @class OFThreadStartFailedException \
* OFThreadStartFailedException.h ObjFW/OFThreadStartFailedException.h
*
* @brief An exception indicating that starting a thread failed.
*/
@interface OFThreadStartFailedException: OFException
{
OFThread *_thread;
}
/*!
* The thread which could not be started.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFThread;
/*!
* @class OFThreadStartFailedException \
* OFThreadStartFailedException.h ObjFW/OFThreadStartFailedException.h
*
* @brief An exception indicating that starting a thread failed.
*/
@interface OFThreadStartFailedException: OFException
{
OFThread *_thread;
}
/*!
* The thread which could not be started.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFThread *thread;
/*!
* @brief Creates a new, autoreleased thread start failed exception.
*
* @param thread The thread which could not be started
* @return A new, autoreleased thread start failed exception
*/
+ (instancetype)exceptionWithThread: (nullable OFThread*)thread;
/*!
* @brief Initializes an already allocated thread start failed exception.
*
* @param thread The thread which could not be started
* @return An initialized thread start failed exception
*/
- initWithThread: (nullable OFThread*)thread;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFThreadStartFailedException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
| < < < < < > | | > > | 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 |
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
- initWithThread: (OFThread*)thread
{
self = [super init];
_thread = [thread retain];
return self;
}
- (void)dealloc
{
[_thread release];
[super dealloc];
}
- (OFString*)description
{
if (_thread != nil)
return [OFString stringWithFormat:
@"Starting a thread of type %@ failed!", [_thread class]];
else
return @"Starting a thread failed!";
}
@end
|
Changes to src/exceptions/OFThreadStillRunningException.h.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
@class OFThread;
/*!
* @class OFThreadStillRunningException \
* OFThreadStillRunningException.h ObjFW/OFThreadStillRunningException.h
*
* @brief An exception indicating that a thread is still running.
*/
@interface OFThreadStillRunningException: OFException
{
OFThread *_thread;
}
/*!
* The thread which is still running.
*/
| > > | | | > > | 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 |
#import "OFException.h"
#ifndef OF_HAVE_THREADS
# error No threads available!
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFThread;
/*!
* @class OFThreadStillRunningException \
* OFThreadStillRunningException.h ObjFW/OFThreadStillRunningException.h
*
* @brief An exception indicating that a thread is still running.
*/
@interface OFThreadStillRunningException: OFException
{
OFThread *_thread;
}
/*!
* The thread which is still running.
*/
@property OF_NULLABLE_PROPERTY (readonly, retain) OFThread *thread;
/*!
* @brief Creates a new, autoreleased thread still running exception.
*
* @param thread The thread which is still running
* @return A new, autoreleased thread still running exception
*/
+ (instancetype)exceptionWithThread: (nullable OFThread*)thread;
/*!
* @brief Initializes an already allocated thread still running exception.
*
* @param thread The thread which is still running
* @return An initialized thread still running exception
*/
- initWithThread: (nullable OFThread*)thread;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFThreadStillRunningException.m.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
| < < < < < > | | > > > > | | 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 |
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
- initWithThread: (OFThread*)thread
{
self = [super init];
_thread = [thread retain];
return self;
}
- (void)dealloc
{
[_thread release];
[super dealloc];
}
- (OFString*)description
{
if (_thread)
return [OFString stringWithFormat:
@"Deallocation of a thread of type %@ was tried, even "
@"though it was still running!",
[_thread class]];
else
return @"Deallocation of a thread was tried, even though it "
@"was still running!";
}
@end
|
Changes to src/exceptions/OFTruncatedDataException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" /*! * @class OFTruncatedDataException \ * OFTruncatedDataException.h ObjFW/OFTruncatedDataException.h * * @brief An exception indicating that data was truncated while it should not * have been truncated. */ @interface OFTruncatedDataException: OFException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFTruncatedDataException \ * OFTruncatedDataException.h ObjFW/OFTruncatedDataException.h * * @brief An exception indicating that data was truncated while it should not * have been truncated. */ @interface OFTruncatedDataException: OFException @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFUnboundNamespaceException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" @class OFXMLElement; /*! * @class OFUnboundNamespaceException \ * OFUnboundNamespaceException.h ObjFW/OFUnboundNamespaceException.h * * @brief An exception indicating an attempt to use an unbound namespace. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFXMLElement; /*! * @class OFUnboundNamespaceException \ * OFUnboundNamespaceException.h ObjFW/OFUnboundNamespaceException.h * * @brief An exception indicating an attempt to use an unbound namespace. |
| ︙ | ︙ | |||
60 61 62 63 64 65 66 | * @param namespace_ The namespace which is unbound * @param element The element in which the namespace was not bound * @return An initialized unbound namespace exception */ - initWithNamespace: (OFString*)namespace_ element: (OFXMLElement*)element; @end | > > | 62 63 64 65 66 67 68 69 70 | * @param namespace_ The namespace which is unbound * @param element The element in which the namespace was not bound * @return An initialized unbound namespace exception */ - initWithNamespace: (OFString*)namespace_ element: (OFXMLElement*)element; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFUnboundPrefixException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" @class OFXMLParser; /*! * @class OFUnboundPrefixException \ * OFUnboundPrefixException.h ObjFW/OFUnboundPrefixException.h * * @brief An exception indicating an attempt to use an unbound prefix. | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFXMLParser; /*! * @class OFUnboundPrefixException \ * OFUnboundPrefixException.h ObjFW/OFUnboundPrefixException.h * * @brief An exception indicating an attempt to use an unbound prefix. |
| ︙ | ︙ | |||
56 57 58 59 60 61 62 | * @param prefix The prefix which is unbound * @param parser The parser which encountered the unbound prefix * @return An initialized unbound prefix exception */ - initWithPrefix: (OFString*)prefix parser: (OFXMLParser*)parser; @end | > > | 58 59 60 61 62 63 64 65 66 | * @param prefix The prefix which is unbound * @param parser The parser which encountered the unbound prefix * @return An initialized unbound prefix exception */ - initWithPrefix: (OFString*)prefix parser: (OFXMLParser*)parser; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFUndefinedKeyException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFUndefinedKeyException \ * OFUndefinedKeyException.h ObjFW/OFUndefinedKeyException.h * * @brief An exception indicating that a key for Key Value Coding is undefined. */ @interface OFUndefinedKeyException: OFException | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFUndefinedKeyException \ * OFUndefinedKeyException.h ObjFW/OFUndefinedKeyException.h * * @brief An exception indicating that a key for Key Value Coding is undefined. */ @interface OFUndefinedKeyException: OFException |
| ︙ | ︙ | |||
88 89 90 91 92 93 94 | * * @return An initialized undefined key exception */ - initWithObject: (id)object key: (OFString*)key value: (id)value; @end | > > | 90 91 92 93 94 95 96 97 98 | * * @return An initialized undefined key exception */ - initWithObject: (id)object key: (OFString*)key value: (id)value; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFUnknownXMLEntityException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFUnknownXMLEntityException \ * OFUnknownXMLEntityException.h ObjFW/OFUnknownXMLEntityException.h * * @brief An exception indicating that a parser encountered an unknown XML * entity. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFUnknownXMLEntityException \ * OFUnknownXMLEntityException.h ObjFW/OFUnknownXMLEntityException.h * * @brief An exception indicating that a parser encountered an unknown XML * entity. */ |
| ︙ | ︙ | |||
45 46 47 48 49 50 51 | * @brief Initializes an already allocated unknown XML entity exception. * * @param entityName The name of the unknown XML entity * @return An initialized unknown XML entity exception */ - initWithEntityName: (OFString*)entityName; @end | > > | 47 48 49 50 51 52 53 54 55 | * @brief Initializes an already allocated unknown XML entity exception. * * @param entityName The name of the unknown XML entity * @return An initialized unknown XML entity exception */ - initWithEntityName: (OFString*)entityName; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFUnlockFailedException.h.
| ︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#import "OFLocking.h"
/*!
* @class OFUnlockFailedException \
* OFUnlockFailedException.h ObjFW/OFUnlockFailedException.h
*
* @brief An exception indicating that unlocking a lock failed.
*/
@interface OFUnlockFailedException: OFException
{
id <OFLocking> _lock;
}
/*!
* The lock which could not be unlocked.
*/
| > > | | | > > | 13 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 |
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#import "OFLocking.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFUnlockFailedException \
* OFUnlockFailedException.h ObjFW/OFUnlockFailedException.h
*
* @brief An exception indicating that unlocking a lock failed.
*/
@interface OFUnlockFailedException: OFException
{
id <OFLocking> _lock;
}
/*!
* The lock which could not be unlocked.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id <OFLocking> lock;
/*!
* @brief Creates a new, autoreleased unlock failed exception.
*
* @param lock The lock which could not be unlocked
* @return A new, autoreleased unlock failed exception
*/
+ (instancetype)exceptionWithLock: (nullable id <OFLocking>)lock;
/*!
* @brief Initializes an already allocated unlock failed exception.
*
* @param lock The lock which could not be unlocked
* @return An initialized unlock failed exception
*/
- initWithLock: (nullable id <OFLocking>)lock;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/OFUnsupportedProtocolException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" @class OFURL; /*! * @class OFUnsupportedProtocolException \ * OFUnsupportedProtocolException.h \ * ObjFW/OFUnsupportedProtocolException.h * | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN @class OFURL; /*! * @class OFUnsupportedProtocolException \ * OFUnsupportedProtocolException.h \ * ObjFW/OFUnsupportedProtocolException.h * |
| ︙ | ︙ | |||
48 49 50 51 52 53 54 | * @brief Initializes an already allocated unsupported protocol exception * * @param URL The URL whose protocol is unsupported * @return An initialized unsupported protocol exception */ - initWithURL: (OFURL*)URL; @end | > > | 50 51 52 53 54 55 56 57 58 | * @brief Initializes an already allocated unsupported protocol exception * * @param URL The URL whose protocol is unsupported * @return An initialized unsupported protocol exception */ - initWithURL: (OFURL*)URL; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFUnsupportedVersionException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * 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. */ #import "OFException.h" /*! * @class OFUnsupportedVersionException \ * OFUnsupportedVersionException.h ObjFW/OFUnsupportedVersionException.h * * @brief An exception indicating that the specified version of the format or * protocol is not supported. */ | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * 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. */ #import "OFException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFUnsupportedVersionException \ * OFUnsupportedVersionException.h ObjFW/OFUnsupportedVersionException.h * * @brief An exception indicating that the specified version of the format or * protocol is not supported. */ |
| ︙ | ︙ | |||
45 46 47 48 49 50 51 | * @brief Initializes an already allocated unsupported protocol exception. * * @param version The version which is unsupported * @return An initialized unsupported version exception */ - initWithVersion: (OFString*)version; @end | > > | 47 48 49 50 51 52 53 54 55 | * @brief Initializes an already allocated unsupported protocol exception. * * @param version The version which is unsupported * @return An initialized unsupported version exception */ - initWithVersion: (OFString*)version; @end OF_ASSUME_NONNULL_END |
Changes to src/exceptions/OFWriteFailedException.h.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #import "OFReadOrWriteFailedException.h" /*! * @class OFWriteFailedException \ * OFWriteFailedException.h ObjFW/OFWriteFailedException.h * * @brief An exception indicating that writing to an object failed. */ @interface OFWriteFailedException: OFReadOrWriteFailedException @end | > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * 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. */ #import "OFReadOrWriteFailedException.h" OF_ASSUME_NONNULL_BEGIN /*! * @class OFWriteFailedException \ * OFWriteFailedException.h ObjFW/OFWriteFailedException.h * * @brief An exception indicating that writing to an object failed. */ @interface OFWriteFailedException: OFReadOrWriteFailedException @end OF_ASSUME_NONNULL_END |