Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -339,21 +339,21 @@ /** * @brief Creates a string by joining all objects of the array. * * @param separator The string with which the objects should be joined * @return A string containing all objects joined by the separator - * @throw OFInvalidArgumentException The provided separator is `nil` + * @throw OFInvalidArgumentException The provided separator was `nil` */ - (OFString *)componentsJoinedByString: (OFString *)separator; /** * @brief Creates a string by joining all objects of the array. * * @param separator The string with which the objects should be joined * @param options Options according to which the objects should be joined * @return A string containing all objects joined by the separator - * @throw OFInvalidArgumentException The provided separator is `nil` + * @throw OFInvalidArgumentException The provided separator was `nil` */ - (OFString *)componentsJoinedByString: (OFString *)separator options: (OFArrayJoinOptions)options; /** @@ -361,11 +361,11 @@ * and joining the strings returned by calling the selector. * * @param separator The string with which the objects should be joined * @param selector The selector to perform on the objects * @return A string containing all objects joined by the separator - * @throw OFInvalidArgumentException The provided separator is `nil` or calling + * @throw OFInvalidArgumentException The provided separator was `nil` or calling * the provided selector returned `nil` */ - (OFString *)componentsJoinedByString: (OFString *)separator usingSelector: (SEL)selector; @@ -375,11 +375,11 @@ * * @param separator The string with which the objects should be joined * @param selector The selector to perform on the objects * @param options Options according to which the objects should be joined * @return A string containing all objects joined by the separator - * @throw OFInvalidArgumentException The provided separator is `nil` or calling + * @throw OFInvalidArgumentException The provided separator was `nil` or calling * the provided selector returned `nil` */ - (OFString *)componentsJoinedByString: (OFString *)separator usingSelector: (SEL)selector options: (OFArrayJoinOptions)options; Index: src/OFColor.h ================================================================== --- src/OFColor.h +++ src/OFColor.h @@ -54,10 +54,11 @@ * @param red The red value of the color, between 0.0 and 1.0 * @param green The green value of the color, between 0.0 and 1.0 * @param blue The blue value of the color, between 0.0 and 1.0 * @param alpha The alpha value of the color, between 0.0 and 1.0 * @return A new color with the specified red, green, blue and alpha value + * @throw OFInvalidArgumentException One of the specified arguments is invalid */ + (instancetype)colorWithRed: (float)red green: (float)green blue: (float)blue alpha: (float)alpha; @@ -214,10 +215,11 @@ * @param green The green value of the color, between 0.0 and 1.0 * @param blue The blue value of the color, between 0.0 and 1.0 * @param alpha The alpha value of the color, between 0.0 and 1.0 * @return A color initialized with the specified red, green, blue and alpha * value + * @throw OFInvalidArgumentException One of the specified arguments is invalid */ - (instancetype)initWithRed: (float)red green: (float)green blue: (float)blue alpha: (float)alpha; Index: src/OFCondition.h ================================================================== --- src/OFCondition.h +++ src/OFCondition.h @@ -43,10 +43,12 @@ * @brief Blocks the current thread until another thread calls @ref signal or * @ref broadcast. * * @note Waiting might have been interrupted by a signal. It is thus recommended * to check the condition again after @ref wait returned! + * + * @throw OFConditionWaitFailedException Waiting for the condition failed */ - (void)wait; #ifdef OF_AMIGAOS /** @@ -55,10 +57,11 @@ * * @note This is only available on AmigaOS! * * @param signalMask A pointer to a signal mask of Exec Signals to receive. * This is modified and set to the mask of signals received. + * @throw OFConditionWaitFailedException Waiting for the condition failed */ - (void)waitForConditionOrExecSignal: (ULONG *)signalMask; #endif /** @@ -68,10 +71,11 @@ * @note Waiting might have been interrupted by a signal. It is thus recommended * to check the condition again after @ref waitForTimeInterval: returned! * * @param timeInterval The time interval until the timeout is reached * @return Whether the condition has been signaled + * @throw OFConditionWaitFailedException Waiting for the condition failed */ - (bool)waitForTimeInterval: (OFTimeInterval)timeInterval; #ifdef OF_AMIGAOS /** @@ -82,10 +86,11 @@ * * @param timeInterval The time interval until the timeout is reached * @param signalMask A pointer to a signal mask of Exec Signals to receive. * This is modified and set to the mask of signals received. * @return Whether the condition has been signaled or a signal received + * @throw OFConditionWaitFailedException Waiting for the condition failed */ - (bool)waitForTimeInterval: (OFTimeInterval)timeInterval orExecSignal: (ULONG *)signalMask; #endif @@ -96,10 +101,11 @@ * @note Waiting might have been interrupted by a signal. It is thus recommended * to check the condition again after @ref waitUntilDate: returned! * * @param date The date at which the timeout is reached * @return Whether the condition has been signaled + * @throw OFConditionWaitFailedException Waiting for the condition failed */ - (bool)waitUntilDate: (OFDate *)date; #ifdef OF_AMIGAOS /** @@ -110,21 +116,26 @@ * * @param date The date at which the timeout is reached * @param signalMask A pointer to a signal mask of Exec Signals to receive. * This is modified and set to the mask of signals received. * @return Whether the condition has been signaled or a signal received + * @throw OFConditionWaitFailedException Waiting for the condition failed */ - (bool)waitUntilDate: (OFDate *)date orExecSignal: (ULONG *)signalMask; #endif /** * @brief Signals the next waiting thread to continue. + * + * @throw OFConditionSignalFailedException Signaling the condition failed */ - (void)signal; /** * @brief Signals all threads to continue. + * + * @throw OFConditionBroadcastFailedException Broadcasting the condition failed */ - (void)broadcast; @end OF_ASSUME_NONNULL_END Index: src/OFCountedSet.h ================================================================== --- src/OFCountedSet.h +++ src/OFCountedSet.h @@ -56,14 +56,15 @@ #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each object in the set. * * @param block The block to execute for each object in the set + * @throw OFEnumerationMutationException The set was mutated during enumeration */ - (void)enumerateObjectsAndCountUsingBlock: (OFCountedSetEnumerationBlock)block; #endif #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end OF_ASSUME_NONNULL_END Index: src/OFDNSResolver.h ================================================================== --- src/OFDNSResolver.h +++ src/OFDNSResolver.h @@ -258,10 +258,12 @@ * @brief Synchronously resolves the specified host to socket addresses. * * @param host The host to resolve * @param addressFamily The desired socket address family * @return OFData containing several OFSocketAddress + * @throw OFInvalidServerReplyException The received response was invalid + * @throw OFTruncatedDataException The received response was truncated */ - (OFData *)resolveAddressesForHost: (OFString *)host addressFamily: (OFSocketAddressFamily)addressFamily; /** Index: src/OFDNSResourceRecord.h ================================================================== --- src/OFDNSResourceRecord.h +++ src/OFDNSResourceRecord.h @@ -639,20 +639,23 @@ /** * @brief Parses the specified string as an @ref OFDNSClass. * * @param string The string to parse as an @ref OFDNSClass * @return The parsed OFDNSClass + * @throw OFInvalidArgumentException The specified string is not valid DNS class */ extern OFDNSClass OFDNSClassParseName(OFString *_Nonnull string); /** * @brief Parses the specified string as an @ref OFDNSRecordType. * * @param string The string to parse as an @ref OFDNSRecordType * @return The parsed OFDNSRecordType + * @throw OFInvalidArgumentException The specified string is not valid record + * type */ extern OFDNSRecordType OFDNSRecordTypeParseName(OFString *_Nonnull string); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END Index: src/OFEnumerator.h ================================================================== --- src/OFEnumerator.h +++ src/OFEnumerator.h @@ -80,11 +80,10 @@ * @param state Context information for the enumeration * @param objects A pointer to an array where to put the objects * @param count The number of objects that can be stored at objects * @return The number of objects returned in objects or 0 when the enumeration * finished. - * @throw OFOutOfRangeException The object is too big for fast enumeration */ - (int)countByEnumeratingWithState: (OFFastEnumerationState *)state objects: (id __unsafe_unretained _Nonnull *_Nonnull) objects count: (int)count; Index: src/OFMutableSet.h ================================================================== --- src/OFMutableSet.h +++ src/OFMutableSet.h @@ -49,17 +49,19 @@ /** * @brief Adds the specified object to the set. * * @param object The object to add to the set + * @throw OFInvalidArgumentException The specified object was `nil` */ - (void)addObject: (ObjectType)object; /** * @brief Removes the specified object from the set. * * @param object The object to remove from the set + * @throw OFInvalidArgumentException The specified object was `nil` */ - (void)removeObject: (ObjectType)object; /** * @brief Removes all objects from the receiver which are in the specified set. Index: src/OFSerialization.h ================================================================== --- src/OFSerialization.h +++ src/OFSerialization.h @@ -36,10 +36,14 @@ * * @param element An OFXMLElement with the serialized object * @return An initialized object * @throw OFInvalidArgumentException The specified element is not valid * serialization + * @throw OFInvalidFormatException The specified element is not of the correct + * serialization format + * @throw OFOutOfRangeException The specified element is too big for + * deserialization */ - (instancetype)initWithSerialization: (OFXMLElement *)element; @end #ifdef __cplusplus Index: src/OFValue.h ================================================================== --- src/OFValue.h +++ src/OFValue.h @@ -157,10 +157,11 @@ * If the specified size does not match, this raises an * @ref OFOutOfRangeException. * * @param value The buffer to copy the value into * @param size The size of the value + * @throw OFOutOfRangeException The specified size does not match the value */ - (void)getValue: (void *)value size: (size_t)size; @end OF_ASSUME_NONNULL_END