Index: src/OFSocket.h ================================================================== --- src/OFSocket.h +++ src/OFSocket.h @@ -172,28 +172,31 @@ * @ref OFSocketAddress. * * @param IP The IP to parse * @param port The port to use * @return The parsed IP and port as an OFSocketAddress + * @throw OFInvalidFormatException The specified string is not a valid IP */ extern OFSocketAddress OFSocketAddressParseIP(OFString *IP, uint16_t port); /** * @brief Parses the specified IPv4 and port into an @ref OFSocketAddress. * * @param IP The IPv4 to parse * @param port The port to use * @return The parsed IPv4 and port as an OFSocketAddress + * @throw OFInvalidFormatException The specified string is not a valid IPv4 */ extern OFSocketAddress OFSocketAddressParseIPv4(OFString *IP, uint16_t port); /** * @brief Parses the specified IPv6 and port into an @ref OFSocketAddress. * * @param IP The IPv6 to parse * @param port The port to use * @return The parsed IPv6 and port as an OFSocketAddress + * @throw OFInvalidFormatException The specified string is not a valid IPv6 */ extern OFSocketAddress OFSocketAddressParseIPv6(OFString *IP, uint16_t port); /** * @brief Creates a UNIX socket address from the specified path. Index: src/OFURIHandler.h ================================================================== --- src/OFURIHandler.h +++ src/OFURIHandler.h @@ -55,10 +55,11 @@ /** * @brief Returns the handler for the specified URI. * * @return The handler for the specified URI. + * @throw OFUnsupportedProtocolException The specified URI is not supported */ + (OFURIHandler *)handlerForURI: (OFURI *)URI; /** * @brief Opens the item at the specified URI. @@ -80,10 +81,11 @@ * @n * The handler is allowed to not implement all modes and is also * allowed to implement additional, scheme-specific modes. * @return The opened stream if it was successfully opened * @throw OFOpenItemFailedException Opening the item failed + * @throw OFUnsupportedProtocolException The specified URI is not supported */ + (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode; - (instancetype)init OF_UNAVAILABLE; @@ -115,10 +117,12 @@ * @n * The handler is allowed to not implement all modes and is also * allowed to implement additional, scheme-specific modes. * @return The opened stream if it was successfully opened * @throw OFOpenItemFailedException Opening the item failed + * @throw OFUnsupportedProtocolException The specified URI is not supported by + * the handler */ - (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode; /** * @brief Returns the attributes for the item at the specified URI.