Index: src/OFHMAC.h ================================================================== --- src/OFHMAC.h +++ src/OFHMAC.h @@ -46,10 +46,12 @@ /** * @brief A buffer containing the HMAC. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. + * + * @throw OFHashNotCalculatedException The HMAC hasn't been calculated yet */ @property (readonly, nonatomic) const unsigned char *digest OF_RETURNS_INNER_POINTER; /** @@ -98,15 +100,18 @@ /** * @brief Adds a buffer to the HMAC to be calculated. * * @param buffer The buffer which should be included into the calculation * @param length The length of the buffer + * @throw OFHashAlreadyCalculatedException The HMAC has already been calculated */ - (void)updateWithBuffer: (const void *)buffer length: (size_t)length; /** * @brief Performs the final calculation of the HMAC. + * + * @throw OFHashAlreadyCalculatedException The HMAC has already been calculated */ - (void)calculate; /** * @brief Resets the HMAC so that it can be calculated for a new message. Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -180,10 +180,15 @@ * running! If you want to change the delegate during the request, * perform an asynchronous request instead! * * @param request The request to perform * @return The OFHTTPResponse for the request + * @throw OFHTTPRequestFailedException The HTTP request failed + * @throw OFInvalidServerResponseException The server sent an invalid response + * @throw OFUnsupportedVersionException The server responded in an unsupported + * version + * @throw OFAlreadyConnectedException The client is already performing a request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request; /** * @brief Synchronously performs the specified HTTP request. @@ -195,18 +200,24 @@ * @param request The request to perform * @param redirects The maximum number of redirects after which no further * attempt is done to follow the redirect, but instead the * redirect is treated as an OFHTTPResponse * @return The OFHTTPResponse for the request + * @throw OFHTTPRequestFailedException The HTTP request failed + * @throw OFInvalidServerResponseException The server sent an invalid response + * @throw OFUnsupportedVersionException The server responded in an unsupported + * version + * @throw OFAlreadyConnectedException The client is already performing a request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects; /** * @brief Asynchronously performs the specified HTTP request. * * @param request The request to perform + * @throw OFAlreadyConnectedException The client is already performing a request */ - (void)asyncPerformRequest: (OFHTTPRequest *)request; /** * @brief Asynchronously performs the specified HTTP request. @@ -213,10 +224,11 @@ * * @param request The request to perform * @param redirects The maximum number of redirects after which no further * attempt is done to follow the redirect, but instead the * redirect is treated as an OFHTTPResponse + * @throw OFAlreadyConnectedException The client is already performing a request */ - (void)asyncPerformRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects; /** Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -1272,11 +1272,10 @@ if ([scheme caseInsensitiveCompare: @"http"] != OFOrderedSame && [scheme caseInsensitiveCompare: @"https"] != OFOrderedSame) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; if (_inProgress) - /* TODO: Find a better exception */ @throw [OFAlreadyConnectedException exception]; _inProgress = true; [[[[OFHTTPClientRequestHandler alloc]