# HG changeset patch # User Mike Becker # Date 1765302914 -3600 # Node ID f060ecd65575901e96b949838a30598b2811f010 # Parent 9e50f45f8736071ea2b1bffe7d8b661099669670 add note that cxPropertiesLoad() does not roll back the changes to the map on error diff -r 9e50f45f8736 -r f060ecd65575 docs/Writerside/topics/properties.h.md --- a/docs/Writerside/topics/properties.h.md Tue Dec 09 18:51:11 2025 +0100 +++ b/docs/Writerside/topics/properties.h.md Tue Dec 09 18:55:14 2025 +0100 @@ -117,7 +117,8 @@ which opens the file designated by the `filename` and loads all properties from that file into the specified `CxMap`. The convenience macro `cxPropertiesLoadDefault()` uses the default parser configuration for this. The target map must either store pointers of type `char*` or elements of type `cxmutstr`. -In either case, the specified `allocator` is used to allocate the memory for the value. +In either case, the specified `allocator` is used to allocate the memory for the value. +If the function encounters an error, all properties that have been added to the map so far stay in the map; there is no rollback. > The stack buffers used by `cxPropertiesLoad()` can be changed when building UCX from sources > by setting the `CX_PROPERTIES_LOAD_FILL_SIZE` and `CX_PROPERTIES_LOAD_BUF_SIZE` macros diff -r 9e50f45f8736 -r f060ecd65575 src/cx/properties.h --- a/src/cx/properties.h Tue Dec 09 18:51:11 2025 +0100 +++ b/src/cx/properties.h Tue Dec 09 18:55:14 2025 +0100 @@ -357,6 +357,9 @@ * The map must either store pointers of type @c char*, or elements of type cxmutstr. * Any other configuration is not supported. * + * @note When the parser finds an error, all successfully parsed keys before the error + * are added to the map nonetheless. + * * @param config the parser config * @param allocator the allocator for the values that will be stored in the map * @param filename (any string) the absolute or relative path to the file @@ -382,6 +385,9 @@ * The map must either store pointers of type @c char*, or elements of type cxmutstr. * Any other configuration is not supported. * + * @note When the parser finds an error, all successfully parsed keys before the error + * are added to the map nonetheless. + * * @param allocator the allocator for the values that will be stored in the map * @param filename (any string) the absolute or relative path to the file * @param target (@c CxMap*) the map where the properties shall be added