Index: src/OFString+JSONParsing.h ================================================================== --- src/OFString+JSONParsing.h +++ src/OFString+JSONParsing.h @@ -38,10 +38,12 @@ * single primitive, leading to real world JSON files sometimes only * consisting of a single primitive. Therefore, you should not make any * assumptions about the object returned by this method if you don't * want your program to terminate due to a message not understood, but * instead check the returned object using @ref isKindOfClass:. + * + * @throw OFInvalidJSONException The string contained invalid JSON */ @property (readonly, nonatomic) id objectByParsingJSON; /** * @brief Creates an object from the JSON value of the string. @@ -58,12 +60,12 @@ * want your program to terminate due to a message not understood, but * instead check the returned object using @ref isKindOfClass:. * * @param depthLimit The maximum depth the parser should accept (defaults to 32 * if not specified, 0 means no limit (insecure!)) - * * @return An object + * @throw OFInvalidJSONException The string contained invalid JSON */ - (id)objectByParsingJSONWithDepthLimit: (size_t)depthLimit; @end OF_ASSUME_NONNULL_END Index: src/OFString+PercentEncoding.h ================================================================== --- src/OFString+PercentEncoding.h +++ src/OFString+PercentEncoding.h @@ -27,11 +27,13 @@ } #endif @interface OFString (PercentEncoding) /** - * @brief The string with percent-encoding removed. + * @brief The string with percent encoding removed. + * + * @throw OFInvalidFormatException The string is not in proper percent encoding */ @property (readonly, nonatomic) OFString *stringByRemovingPercentEncoding; /** * @brief Percent-encodes a string for use in a URI, but does not escape the Index: src/OFString+PropertyListParsing.h ================================================================== --- src/OFString+PropertyListParsing.h +++ src/OFString+PropertyListParsing.h @@ -28,10 +28,15 @@ @interface OFString (PropertyListParsing) /** * @brief The string interpreted as a property list and parsed as an object. * * @note This only supports XML property lists! + * + * @throw OFInvalidFormatException The string is not in correct XML property + * list format + * @throw OFUnsupportedVersionException The property list is using a version + * that is not supported */ @property (readonly, nonatomic) id objectByParsingPropertyList; @end OF_ASSUME_NONNULL_END Index: src/OFUDPSocket.h ================================================================== --- src/OFUDPSocket.h +++ src/OFUDPSocket.h @@ -70,10 +70,12 @@ * @param host The host to bind to. Use `@"0.0.0.0"` for IPv4 or `@"::"` for * IPv6 to bind to all. * @param port The port to bind to. If the port is 0, an unused port will be * chosen, which can be obtained using the return value. * @return The port the socket was bound to + * @throw OFBindFailedException Binding failed + * @throw OFAlreadyConnectedException The socket is already bound */ - (uint16_t)bindToHost: (OFString *)host port: (uint16_t)port; @end OF_ASSUME_NONNULL_END Index: src/OFUNIXDatagramSocket.h ================================================================== --- src/OFUNIXDatagramSocket.h +++ src/OFUNIXDatagramSocket.h @@ -63,10 +63,12 @@ /** * @brief Bind the socket to the specified path. * * @param path The path to bind to * @return The address on which this socket can be reached + * @throw OFBindFailedException Binding failed + * @throw OFAlreadyConnectedException The socket is already bound */ - (OFSocketAddress)bindToPath: (OFString *)path; @end OF_ASSUME_NONNULL_END Index: src/OFUNIXStreamSocket.h ================================================================== --- src/OFUNIXStreamSocket.h +++ src/OFUNIXStreamSocket.h @@ -52,17 +52,21 @@ /** * @brief Connects the OFUNIXStreamSocket to the specified destination. * * @param path The path to connect to + * @throw OFConnectionFailedException Connecting failed + * @throw OFAlreadyConnectedException The socket is already connected or bound */ - (void)connectToPath: (OFString *)path; /** * @brief Binds the socket to the specified host and port. * * @param path The path to bind to + * @throw OFBindFailedException Binding failed + * @throw OFAlreadyConnectedException The socket is already connected or bound */ - (void)bindToPath: (OFString *)path; @end OF_ASSUME_NONNULL_END