From e88122c06c35b2ba3bb0ab16680e34c76479eb4d Mon Sep 17 00:00:00 2001 From: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:27:54 -0400 Subject: [PATCH] ffi: Fix some missing errors and spelling mistakes in the KV-pair IR format docstrings. (#533) Co-authored-by: Lin Zhihao <59785146+LinZhihao-723@users.noreply.github.com> --- components/core/src/clp/ffi/KeyValuePairLogEvent.hpp | 2 +- components/core/src/clp/ffi/SchemaTree.hpp | 4 +++- components/core/src/clp/ffi/ir_stream/Deserializer.hpp | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp index e08128f49..120588569 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp @@ -33,7 +33,7 @@ class KeyValuePairLogEvent { * @param node_id_value_pairs * @param utc_offset * @return A result containing the key-value pair log event or an error code indicating the - * failure. See `valdiate_node_id_value_pairs` for the possible error codes. + * failure. See `validate_node_id_value_pairs` for the possible error codes. */ [[nodiscard]] static auto create( std::shared_ptr schema_tree, diff --git a/components/core/src/clp/ffi/SchemaTree.hpp b/components/core/src/clp/ffi/SchemaTree.hpp index 6683103c5..5b07e8a09 100644 --- a/components/core/src/clp/ffi/SchemaTree.hpp +++ b/components/core/src/clp/ffi/SchemaTree.hpp @@ -167,7 +167,9 @@ class SchemaTree { * Inserts a new node corresponding to the given locator. * @param locator * @return The ID of the inserted node. - * @throw OperationFailed if a node that corresponds to the given locator already exists. + * @throw OperationFailed if: + * - a node that corresponds to the given locator already exists. + * - the parent node identified by the locator is not an object. */ [[maybe_unused]] auto insert_node(NodeLocator const& locator) -> SchemaTreeNode::id_t; diff --git a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp index c7327fd5b..7ba7822da 100644 --- a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp @@ -50,12 +50,13 @@ class Deserializer { * @param reader * @return A result containing the deserialized log event or an error code indicating the * failure: - * - std::errc::result_out_of_range if the IR stream is truncated - * - std::errc::protocol_error if the IR stream is corrupted + * - std::errc::no_message_available if the IR stream has been fully consumed. + * - std::errc::result_out_of_range if the IR stream is truncated. + * - std::errc::protocol_error if the IR stream is corrupted. * - std::errc::protocol_not_supported if the IR stream contains an unsupported metadata format - * or uses an unsupported version + * or uses an unsupported version. * - Same as `KeyValuePairLogEvent::create` if the intermediate deserialized result cannot - * construct a valid key-value pair log event + * construct a valid key-value pair log event. */ [[nodiscard]] auto deserialize_to_next_log_event(ReaderInterface& reader ) -> OUTCOME_V2_NAMESPACE::std_result;