Comment: | Document more exceptions |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5a4e00df9a5f2a673abc5d8bb54a0729 |
User & Date: | js on 2022-09-25 20:14:01 |
Other Links: | manifest | tags |
2022-09-26
| ||
20:32 | Document more exceptions check-in: 4b8c89a6fe user: js tags: trunk | |
2022-09-25
| ||
20:14 | Document more exceptions check-in: 5a4e00df9a user: js tags: trunk | |
15:39 | Document more exceptions check-in: 7ab0c2561a user: js tags: trunk | |
Modified src/OFCryptographicHash.h from [21f208b184] to [635d4f982a].
︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | + + | @property (readonly, nonatomic, getter=isCalculated) bool calculated; /** * @brief A buffer containing the cryptographic hash. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. * * @throw OFHashNotCalculatedException The hash hasn't been calculated yet */ @property (readonly, nonatomic) const unsigned char *digest OF_RETURNS_INNER_POINTER; /** * @brief Creates a new cryptographic hash. * |
︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + + + | - (instancetype)init OF_UNAVAILABLE; /** * @brief Adds a buffer to the cryptographic hash to be calculated. * * @param buffer The buffer which should be included into the calculation * @param length The length of the buffer * @throw OFHashAlreadyCalculatedException The hash has already been calculated */ - (void)updateWithBuffer: (const void *)buffer length: (size_t)length; /** * @brief Performs the final calculation of the cryptographic hash. * * @throw OFHashAlreadyCalculatedException The hash has already been calculated */ - (void)calculate; /** * @brief Resets all state so that a new hash can be calculated. * * @warning This invalidates any pointer previously returned by @ref digest. If |
︙ |
Modified src/OFEnumerator.h from [27d5a99680] to [05d58f021f].
︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | + + + + + + | * doing a fast enumeration. * * @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 OFEnumerationMutationException The object was mutated during * enumeration */ - (int)countByEnumeratingWithState: (OFFastEnumerationState *)state objects: (id __unsafe_unretained _Nonnull *_Nonnull) objects count: (int)count; @end /** * @class OFEnumerator OFEnumerator.h ObjFW/OFEnumerator.h * * @brief A class which provides methods to enumerate through collections. */ @interface OFEnumerator OF_GENERIC(ObjectType): OFObject <OFFastEnumeration> #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #endif /** * @brief Returns the next object or `nil` if there is none left. * * @return The next object or `nil` if there is none left * @throw OFEnumerationMutationException The object was mutated during * enumeration */ - (nullable ObjectType)nextObject; /** * @brief Returns an array of all remaining objects in the collection. * * @return An array of all remaining objects in the collection. * @throw OFEnumerationMutationException The object was mutated during * enumeration */ - (OFArray OF_GENERIC(ObjectType) *)allObjects; #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end OF_ASSUME_NONNULL_END |
Modified src/OFHTTPCookie.h from [534b416a4f] to [28d9caba77].
︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + | /** * @brief Parses the specified response header fields for the specified URL and * returns an array of cookies. * * @param headerFields The response header fields to parse * @param URL The URL for the response header fields to parse * @return An array of cookies * @throw OFInvalidFormatException The specified response header has an invalid * format */ + (OFArray OF_GENERIC(OFHTTPCookie *) *)cookiesWithResponseHeaderFields: (OFDictionary OF_GENERIC(OFString *, OFString *) *)headerFields forURL: (OFURL *)URL; /** * @brief Returns the request header fields for the specified cookies. |
︙ |
Modified src/OFHTTPRequest.h from [5a42fad5dc] to [c73f1b3904].
︙ | |||
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | + + + + + + + + | /** * @brief The URL of the HTTP request. */ @property (copy, nonatomic) OFURL *URL; /** * @brief The protocol version of the HTTP request. * * @throw OFUnsupportedVersionException The specified version cannot be set * because it is not supported */ @property (nonatomic) OFHTTPRequestProtocolVersion protocolVersion; /** * @brief The protocol version of the HTTP request as a string. * * @throw OFUnsupportedVersionException The specified version cannot be set * because it is not supported * @throw OFInvalidFormatException The specified version cannot be set because * it is not in a valid format */ @property (copy, nonatomic) OFString *protocolVersionString; /** * @brief The request method of the HTTP request. */ @property (nonatomic) OFHTTPRequestMethod method; |
︙ | |||
141 142 143 144 145 146 147 148 149 150 151 152 153 154 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | + + | OFHTTPRequestMethod method); /** * @brief Returns the request method for the specified string. * * @param string The string for which the request method should be returned * @return The request method for the specified string * @throw OFInvalidFormatException The specified string is not a valid HTTP * request method */ extern OFHTTPRequestMethod OFHTTPRequestMethodParseName(OFString *string); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |
Modified src/OFHTTPRequest.m from [e5f40fde4a] to [faac6100ad].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | if ([string isEqual: @"DELETE"]) return OFHTTPRequestMethodDelete; if ([string isEqual: @"TRACE"]) return OFHTTPRequestMethodTrace; if ([string isEqual: @"CONNECT"]) return OFHTTPRequestMethodConnect; |
︙ |
Modified src/OFHTTPResponse.h from [b0f5fe9413] to [3c482db81b].
︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + + + + + + + + | OFHTTPRequestProtocolVersion _protocolVersion; short _statusCode; OFDictionary OF_GENERIC(OFString *, OFString *) *_headers; } /** * @brief The protocol version of the HTTP request response. * * @throw OFUnsupportedVersionException The specified version cannot be set * because it is not supported */ @property (nonatomic) OFHTTPRequestProtocolVersion protocolVersion; /** * @brief The protocol version of the HTTP request response as a string. * * @throw OFUnsupportedVersionException The specified version cannot be set * because it is not supported * @throw OFInvalidFormatException The specified version cannot be set because * it is not in a valid format */ @property (copy, nonatomic) OFString *protocolVersionString; /** * @brief The status code of the response to the HTTP request. */ @property (nonatomic) short statusCode; |
︙ |
Modified src/OFHTTPServer.h from [a2fd4b8141] to [ba5fc5aae1].
︙ | |||
102 103 104 105 106 107 108 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - - + + - - + + - - + + | OFArray *_threadPool; #endif } /** * @brief The host on which the HTTP server will listen. * |
︙ | |||
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | + + | * * @return A new HTTP server */ + (instancetype)server; /** * @brief Starts the HTTP server in the current thread's run loop. * * @throw OFAlreadyConnectedException The server had already been started */ - (void)start; /** * @brief Stops the HTTP server, meaning it will not accept any new incoming * connections, but still handle existing connections until they are * finished or timed out. */ - (void)stop; @end OF_ASSUME_NONNULL_END |
Modified src/OFINICategory.h from [e194c2c9e1] to [8e0c968abf].
︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | + + + + + + + + | * If the specified key is a multi-key (see @ref stringArrayForKey:), the value * of the first key/value pair found is returned. * * @param key The key for which the long long should be returned * @param defaultValue The value to return if the key does not exist * @return The long long for the specified key or the specified default value * if it does not exist * @throw OFInvalidFormatException The specified key is not in the correct * format for a long long */ - (long long)longLongForKey: (OFString *)key defaultValue: (long long)defaultValue; /** * @brief Returns the bool for the specified key or the specified default value * if it does not exist. * * If the specified key is a multi-key (see @ref stringArrayForKey:), the value * of the first key/value pair found is returned. * * @param key The key for which the bool should be returned * @param defaultValue The value to return if the key does not exist * @return The bool for the specified key or the specified default value if it * does not exist * @throw OFInvalidFormatException The specified key is not in the correct * format for a bool */ - (bool)boolForKey: (OFString *)key defaultValue: (bool)defaultValue; /** * @brief Returns the float for the specified key or the specified default * value if it does not exist. * * If the specified key is a multi-key (see @ref stringArrayForKey:), the value * of the first key/value pair found is returned. * * @param key The key for which the float should be returned * @param defaultValue The value to return if the key does not exist * @return The float for the specified key or the specified default value if it * does not exist * @throw OFInvalidFormatException The specified key is not in the correct * format for a float */ - (float)floatForKey: (OFString *)key defaultValue: (float)defaultValue; /** * @brief Returns the double for the specified key or the specified default * value if it does not exist. * * If the specified key is a multi-key (see @ref stringArrayForKey:), the value * of the first key/value pair found is returned. * * @param key The key for which the double should be returned * @param defaultValue The value to return if the key does not exist * @return The double for the specified key or the specified default value if * it does not exist * @throw OFInvalidFormatException The specified key is not in the correct * format for a double */ - (double)doubleForKey: (OFString *)key defaultValue: (double)defaultValue; /** * @brief Returns an array of strings for the specified multi-key, or an empty * array if the key does not exist. * |
︙ |
Modified src/OFINIFile.h from [de47c3e875] to [7ac69fbcc1].
︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + + + + - + + + + + + + + - + + + + | /** * @brief Creates a new OFINIFile with the contents of the specified file. * * @param URL The URL to the file whose contents the OFINIFile should contain * * @return A new, autoreleased OFINIFile with the contents of the specified file * @throw OFInvalidFormatException The format of the specified INI file is * invalid * @throw OFInvalidEncodingException The INI file is not in the specified * encoding */ + (instancetype)fileWithURL: (OFURL *)URL; /** * @brief Creates a new OFINIFile with the contents of the specified file in * the specified encoding. * * @param URL The URL to the file whose contents the OFINIFile should contain * @param encoding The encoding of the specified file |
︙ |
Modified src/OFIPXSocket.h from [a2ca3d4d82] to [08f31366a1].
︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + | * @brief Bind the socket to the specified network, node and port with the * specified packet type. * * @param port The port (sometimes called socket number) to bind to. 0 means to * pick one and return it. * @param packetType The packet type to use on the socket * @return The address on which this socket can be reached * @throw OFBindFailedException Binding failed * @throw OFAlreadyConnectedException The socket is already bound */ - (OFSocketAddress)bindToPort: (uint16_t)port packetType: (uint8_t)packetType; @end OF_ASSUME_NONNULL_END |
Modified src/OFKernelEventObserver.h from [c766a415b3] to [81efdafa0c].
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | - + + - + + - + + | * failed */ - (void)removeObjectForWriting: (id <OFReadyForWritingObserving>)object; /** * @brief Observes all objects and blocks until an event happens on an object. * |
︙ |
Modified src/OFLHAArchive.h from [0ac8f473ff] to [e45df52e7c].
︙ | |||
113 114 115 116 117 118 119 120 121 122 123 124 125 126 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | + + + + | * @ref streamForReadingCurrentEntry or * @ref streamForWritingEntry:! Reading from or writing to an * invalidated stream will throw an @ref OFReadFailedException or * @ref OFWriteFailedException! * * @return The next entry from the LHA archive or `nil` if all entries have * been read * @throw OFInvalidFormatException The archive's format is invalid * @throw OFUnsupportedVersionException The archive's format is of an * unsupported version * @throw OFTruncatedDataException The archive was truncated */ - (nullable OFLHAArchiveEntry *)nextEntry; /** * @brief Returns a stream for writing the specified entry. * * @note This is only available in write and append mode. |
︙ |
Modified src/OFLocale.h from [fcc8f077d2] to [560bb77e15].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + + | * @def OF_LOCALIZED * * @brief Returns the localized string for the specified ID with the specified * arguments inserted. * * @param ID The ID of the localized string to retrieve * @return The localized string with the specified arguments replaced * @throw OFInvalidFormatException The string (either the fallback or the * localized one) contains an invalid format */ #define OF_LOCALIZED(ID, ...) \ [[OFLocale currentLocale] localizedStringForID: ID \ fallback: __VA_ARGS__, nil] @class OFMutableArray OF_GENERIC(ObjectType); @class OFDictionary OF_GENERIC(KeyType, ObjectType); |
︙ | |||
205 206 207 208 209 210 211 212 213 214 215 216 217 218 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | + + | * @param fallback The fallback to use in case the localized string cannot be * looked up or is missing. This can also be an array and use * plural scripting, just like with the JSON language files. * @param arguments A va_list of arguments, consisting of pairs of variable * names and values to replace in the localized string, * terminated with `nil` * @return The localized string * @throw OFInvalidFormatException The string (either the fallback or the * localized one) contains an invalid format */ - (OFString *)localizedStringForID: (OFConstantString *)ID fallback: (id)fallback arguments: (va_list)arguments; @end OF_ASSUME_NONNULL_END |