@@ -53,10 +53,14 @@ { Class inClass; OFString *string; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) Class inClass; +#endif + /** * Creates a new exception. * * \param class_ The class of the object which caused the exception * \return A new exception @@ -87,10 +91,14 @@ */ @interface OFOutOfMemoryException: OFException { size_t requestedSize; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly) size_t requestedSize; +#endif /** * \param class_ The class of the object which caused the exception * \param size The size of the memory that couldn't be allocated * \return A new no memory exception @@ -127,10 +135,14 @@ @interface OFMemoryNotPartOfObjectException: OFException { void *pointer; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly) void *pointer; +#endif + /** * \param class_ The class of the object which caused the exception * \param ptr A pointer to the memory that is not part of the object * \return A new memory not part of object exception */ @@ -160,10 +172,14 @@ @interface OFNotImplementedException: OFException { SEL selector; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly) SEL selector; +#endif + /** * \param class_ The class of the object which caused the exception * \param selector The selector which is not or not fully implemented * \return A new not implemented exception */ @@ -177,10 +193,15 @@ * \param selector The selector which is not or not fully implemented * \return An initialized not implemented exception */ - initWithClass: (Class)class_ selector: (SEL)selector; + +/** + * \return The selector which is not or not fully implemented + */ +- (SEL)selector; @end /** * \brief An exception indicating the given value is out of range. */ @@ -192,10 +213,14 @@ */ @interface OFInvalidArgumentException: OFException { SEL selector; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly) SEL selector; +#endif /** * \param class_ The class of the object which caused the exception * \param selector The selector which doesn't accept the argument * \return A new invalid argument exception @@ -210,10 +235,15 @@ * \param selector The selector which doesn't accept the argument * \return An initialized invalid argument exception */ - initWithClass: (Class)class_ selector: (SEL)selector; + +/** + * \return The selector to which an invalid argument was passed + */ +- (SEL)selector; @end /** * \brief An exception indicating that the encoding is invalid for this object. */ @@ -246,10 +276,16 @@ { OFString *path; OFString *mode; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *path; +@property (readonly, nonatomic) OFString *mode; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param path A string with the path of the file tried to open * \param mode A string with the mode in which the file should have been opened @@ -293,10 +329,15 @@ @interface OFReadOrWriteFailedException: OFException { size_t requestedSize; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly) size_t requestedSize; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param size The requested size of the data that couldn't be read / written * \return A new open file failed exception @@ -343,10 +384,14 @@ @interface OFSeekFailedException: OFException { int errNo; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly) int errNo; +#endif + /** * \return The errno from when the exception was created */ - (int)errNo; @end @@ -357,10 +402,15 @@ @interface OFCreateDirectoryFailedException: OFException { OFString *path; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *path; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param path A string with the path of the directory which couldn't be created * \return A new create directory failed exception @@ -396,10 +446,16 @@ { OFString *path; mode_t mode; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *path; +@property (readonly) mode_t mode; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param path The path of the file * \param mode The new mode for the file @@ -446,10 +502,17 @@ OFString *path; uid_t owner; gid_t group; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *path; +@property (readonly) uid_t owner; +@property (readonly) gid_t group; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param path The path of the file * \param owner The new owner for the file @@ -505,10 +568,16 @@ OFString *sourcePath; OFString *destinationPath; int errNo; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *sourcePath; +@property (readonly, nonatomic) OFString *destinationPath; +@property (readonly) int errNo; +#endif + /** * \param class_ The class of the object which caused the exception * \param src The original path * \param dst The new path * \return A new rename file failed exception @@ -552,10 +621,15 @@ { OFString *path; int errNo; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *path; +@property (readonly) int errNo; +#endif + /** * \param class_ The class of the object which caused the exception * \param path The path of the file * \return A new delete file failed exception */ @@ -591,10 +665,16 @@ { OFString *sourcePath; OFString *destinationPath; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *sourcePath; +@property (readonly, nonatomic) OFString *destinationPath; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param src The source for the link * \param dest The destination for the link @@ -639,10 +719,16 @@ { OFString *sourcePath; OFString *destinationPath; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *sourcePath; +@property (readonly, nonatomic) OFString *destinationPath; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param src The source for the symlink * \param dest The destination for the symlink @@ -708,10 +794,16 @@ OFString *node; OFString *service; int errNo; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *node; +@property (readonly, nonatomic) OFString *service; +@property (readonly) int errNo; +#endif + /** * \param class_ The class of the object which caused the exception * \param node The node for which translation was requested * \param service The service of the node for which translation was requested * \return A new address translation failed exception @@ -755,10 +847,16 @@ { OFString *node; OFString *service; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *node; +@property (readonly, nonatomic) OFString *service; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param node The node to which the connection failed * \param service The service on the node to which the connection failed @@ -804,10 +902,17 @@ OFString *node; OFString *service; int family; int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, nonatomic) OFString *node; +@property (readonly, nonatomic) OFString *service; +@property (readonly) int family; +@property (readonly) int errNo; +#endif /** * \param class_ The class of the object which caused the exception * \param node The node on which binding failed * \param service The service on which binding failed @@ -861,10 +966,15 @@ { int backLog; int errNo; } +#ifdef OF_HAVE_PROPERTIES +@property (readonly) int backLog; +@property (readonly) int errNo; +#endif + /** * \param class_ The class of the object which caused the exception * \param backlog The requested size of the back log * \return A new listen failed exception */ @@ -897,10 +1007,14 @@ */ @interface OFAcceptFailedException: OFException { int errNo; } + +#ifdef OF_HAVE_PROPERTIES +@property (readonly) int errNo; +#endif /** * \return The errno from when the exception was created */ - (int)errNo;