@@ -14,11 +14,12 @@ * file. */ #import "OFException.h" -#ifdef OF_HAVE_CHOWN +OF_ASSUME_NONNULL_BEGIN + /*! * @class OFChangeOwnerFailedException \ * OFChangeOwnerFailedException.h ObjFW/OFChangeOwnerFailedException.h * * @brief An exception indicating that changing the owner of an item failed. @@ -35,16 +36,16 @@ @property (readonly, nonatomic) OFString *path; /*! * The new owner for the item. */ -@property (readonly, nonatomic) OFString *owner; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *owner; /*! * The new group for the item. */ -@property (readonly, nonatomic) OFString *group; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *group; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; @@ -57,12 +58,12 @@ * @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: (OFString*)owner - group: (OFString*)group + owner: (nullable OFString*)owner + group: (nullable OFString*)group errNo: (int)errNo; /*! * @brief Initializes an already allocated change owner failed exception. * @@ -71,10 +72,11 @@ * @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: (OFString*)owner - group: (OFString*)group + owner: (nullable OFString*)owner + group: (nullable OFString*)group errNo: (int)errNo; @end -#endif + +OF_ASSUME_NONNULL_END