Index: src/exceptions/OFObserveFailedException.h ================================================================== --- src/exceptions/OFObserveFailedException.h +++ src/exceptions/OFObserveFailedException.h @@ -39,12 +39,10 @@ /** * @brief The errno of the error that occurred. */ @property (readonly, nonatomic) int errNo; -+ (instancetype)exception OF_UNAVAILABLE; - /** * @brief Creates a new, autoreleased observe failed exception. * * @param observer The observer which failed to observe * @param errNo The errno of the error that occurred @@ -51,11 +49,11 @@ * @return A new, autoreleased observe failed exception */ + (instancetype)exceptionWithObserver: (OFKernelEventObserver *)observer errNo: (int)errNo; -- (instancetype)init OF_UNAVAILABLE; ++ (instancetype)exception OF_UNAVAILABLE; /** * @brief Initializes an already allocated observe failed exception. * * @param observer The observer which failed to observe @@ -62,8 +60,10 @@ * @param errNo The errno of the error that occurred * @return An initialized observe failed exception */ - (instancetype)initWithObserver: (OFKernelEventObserver *)observer errNo: (int)errNo OF_DESIGNATED_INITIALIZER; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFOpenItemFailedException.h ================================================================== --- src/exceptions/OFOpenItemFailedException.h +++ src/exceptions/OFOpenItemFailedException.h @@ -51,12 +51,10 @@ /** * @brief The errno of the error that occurred. */ @property (readonly, nonatomic) int errNo; -+ (instancetype)exception OF_UNAVAILABLE; - /** * @brief Creates a new, autoreleased open item failed exception. * * @param URL The URL of the item which could not be opened * @param mode A string with the mode in which the item should have been opened @@ -64,10 +62,12 @@ * @return A new, autoreleased open item failed exception */ + (instancetype)exceptionWithURL: (OFURL *)URL mode: (nullable OFString *)mode errNo: (int)errNo; + ++ (instancetype)exception OF_UNAVAILABLE; /** * @brief Creates a new, autoreleased open item failed exception. * * @param path The path of the item which could not be opened @@ -77,12 +77,10 @@ */ + (instancetype)exceptionWithPath: (OFString *)path mode: (nullable OFString *)mode errNo: (int)errNo; -- (instancetype)init OF_UNAVAILABLE; - /** * @brief Initializes an already allocated open item failed exception. * * @param URL The URL of the item which could not be opened * @param mode A string with the mode in which the item should have been opened @@ -102,8 +100,10 @@ * @return An initialized open item failed exception */ - (instancetype)initWithPath: (OFString *)path mode: (nullable OFString *)mode errNo: (int)errNo; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFUnboundNamespaceException.h ================================================================== --- src/exceptions/OFUnboundNamespaceException.h +++ src/exceptions/OFUnboundNamespaceException.h @@ -43,12 +43,10 @@ /** * @brief The element in which the namespace was not bound. */ @property (readonly, nonatomic) OFXMLElement *element; -+ (instancetype)exception OF_UNAVAILABLE; - /** * @brief Creates a new, autoreleased unbound namespace exception. * * @param nameSpace The namespace which is unbound * @param element The element in which the namespace was not bound @@ -55,11 +53,11 @@ * @return A new, autoreleased unbound namespace exception */ + (instancetype)exceptionWithNamespace: (OFString *)nameSpace element: (OFXMLElement *)element; -- (instancetype)init OF_UNAVAILABLE; ++ (instancetype)exception OF_UNAVAILABLE; /** * @brief Initializes an already allocated unbound namespace exception. * * @param nameSpace The namespace which is unbound @@ -67,8 +65,10 @@ * @return An initialized unbound namespace exception */ - (instancetype)initWithNamespace: (OFString *)nameSpace element: (OFXMLElement *)element OF_DESIGNATED_INITIALIZER; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFUnboundPrefixException.h ================================================================== --- src/exceptions/OFUnboundPrefixException.h +++ src/exceptions/OFUnboundPrefixException.h @@ -39,12 +39,10 @@ /** * @brief The parser which encountered the unbound prefix. */ @property (readonly, nonatomic) OFXMLParser *parser; -+ (instancetype)exception OF_UNAVAILABLE; - /** * @brief Creates a new, autoreleased unbound prefix exception. * * @param prefix The prefix which is unbound * @param parser The parser which encountered the unbound prefix @@ -51,11 +49,11 @@ * @return A new, autoreleased unbound prefix exception */ + (instancetype)exceptionWithPrefix: (OFString *)prefix parser: (OFXMLParser *)parser; -- (instancetype)init OF_UNAVAILABLE; ++ (instancetype)exception OF_UNAVAILABLE; /** * @brief Initializes an already allocated unbound prefix exception. * * @param prefix The prefix which is unbound @@ -62,8 +60,10 @@ * @param parser The parser which encountered the unbound prefix * @return An initialized unbound prefix exception */ - (instancetype)initWithPrefix: (OFString *)prefix parser: (OFXMLParser *)parser OF_DESIGNATED_INITIALIZER; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFUndefinedKeyException.h ================================================================== --- src/exceptions/OFUndefinedKeyException.h +++ src/exceptions/OFUndefinedKeyException.h @@ -44,12 +44,10 @@ /** * @brief The value for the undefined key */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) id value; -+ (instancetype)exception OF_UNAVAILABLE; - /** * @brief Creates a new, autoreleased undefined key exception. * * @param object The object on which the key is undefined * @param key The key which is undefined @@ -69,11 +67,11 @@ */ + (instancetype)exceptionWithObject: (id)object key: (OFString *)key value: (nullable id)value; -- (instancetype)init OF_UNAVAILABLE; ++ (instancetype)exception OF_UNAVAILABLE; /** * @brief Initializes an already allocated undefined key exception. * * @param object The object on which the key is undefined @@ -93,8 +91,10 @@ * @return An initialized undefined key exception */ - (instancetype)initWithObject: (id)object key: (OFString *)key value: (nullable id)value OF_DESIGNATED_INITIALIZER; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFUnknownXMLEntityException.h ================================================================== --- src/exceptions/OFUnknownXMLEntityException.h +++ src/exceptions/OFUnknownXMLEntityException.h @@ -40,18 +40,20 @@ * @param entityName The name of the unknown XML entity * @return A new, autoreleased unknown XML entity exception */ + (instancetype)exceptionWithEntityName: (OFString *)entityName; -- (instancetype)init OF_UNAVAILABLE; ++ (instancetype)exception OF_UNAVAILABLE; /** * @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 */ - (instancetype)initWithEntityName: (OFString *)entityName OF_DESIGNATED_INITIALIZER; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFUnknownXMLEntityException.m ================================================================== --- src/exceptions/OFUnknownXMLEntityException.m +++ src/exceptions/OFUnknownXMLEntityException.m @@ -24,13 +24,13 @@ + (instancetype)exceptionWithEntityName: (OFString *)entityName { return [[[self alloc] initWithEntityName: entityName] autorelease]; } -- (instancetype)init ++ (instancetype)exception { - OF_INVALID_INIT_METHOD + OF_UNRECOGNIZED_SELECTOR } - (instancetype)initWithEntityName: (OFString *)entityName { self = [super init]; @@ -42,10 +42,15 @@ @throw e; } return self; } + +- (instancetype)init +{ + OF_INVALID_INIT_METHOD +} - (void)dealloc { [_entityName release]; Index: src/exceptions/OFUnlockFailedException.h ================================================================== --- src/exceptions/OFUnlockFailedException.h +++ src/exceptions/OFUnlockFailedException.h @@ -24,11 +24,11 @@ * * @brief An exception indicating that unlocking a lock failed. */ @interface OFUnlockFailedException: OFException { - id _lock; + id _Nullable _lock; int _errNo; } /** * @brief The lock which could not be unlocked. Index: src/exceptions/OFUnsupportedProtocolException.h ================================================================== --- src/exceptions/OFUnsupportedProtocolException.h +++ src/exceptions/OFUnsupportedProtocolException.h @@ -27,31 +27,31 @@ * @brief An exception indicating that the protocol specified by the URL is not * supported. */ @interface OFUnsupportedProtocolException: OFException { - OFURL *_URL; + OFURL *_Nullable _URL; } /** * @brief The URL whose protocol is unsupported. */ -@property (readonly, nonatomic) OFURL *URL; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFURL *URL; /** * @brief Creates a new, autoreleased unsupported protocol exception. * * @param URL The URL whose protocol is unsupported * @return A new, autoreleased unsupported protocol exception */ -+ (instancetype)exceptionWithURL: (OFURL*)URL; ++ (instancetype)exceptionWithURL: (nullable OFURL*)URL; /** * @brief Initializes an already allocated unsupported protocol exception * * @param URL The URL whose protocol is unsupported * @return An initialized unsupported protocol exception */ -- (instancetype)initWithURL: (OFURL*)URL OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithURL: (nullable OFURL*)URL OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END Index: src/exceptions/OFUnsupportedVersionException.h ================================================================== --- src/exceptions/OFUnsupportedVersionException.h +++ src/exceptions/OFUnsupportedVersionException.h @@ -32,27 +32,27 @@ /** * @brief The version which is unsupported. */ @property (readonly, nonatomic) OFString *version; -+ (instancetype)exception OF_UNAVAILABLE; - /** * @brief Creates a new, autoreleased unsupported version exception. * * @param version The version which is unsupported * @return A new, autoreleased unsupported version exception */ + (instancetype)exceptionWithVersion: (OFString *)version; -- (instancetype)init OF_UNAVAILABLE; ++ (instancetype)exception OF_UNAVAILABLE; /** * @brief Initializes an already allocated unsupported protocol exception. * * @param version The version which is unsupported * @return An initialized unsupported version exception */ - (instancetype)initWithVersion: (OFString *)version OF_DESIGNATED_INITIALIZER; + +- (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END