From baa94903c5e0064502cd089be7e420f1dc8156fa Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 16 May 2025 18:43:58 +0100 Subject: [PATCH] Move relevant usage notes to the changelog --- cpp/README.md | 12 ------------ cpp/docs/api/changelog.rst | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/cpp/README.md b/cpp/README.md index dd93b00c..49aae277 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -79,15 +79,3 @@ To package the build: ``` cpack --config build/CPackConfig.cmake -C RelWithDebInfo ``` - -## Usage notes - -For the first layer of the wrapper, built using Cargo: - -- `LIBLOOT_VERSION_MAJOR`, `LIBLOOT_VERSION_MINOR` and `LIBLOOT_VERSION_PATCH` are exposed as `extern "C"` `static unsigned int` globals. -- All Rust errors are converted to `::rust::Error` exceptions that have a `what()` string that is the concatenation of the error's display string and all its recursive source error display strings. For some errors the `what()` string also includes some data that is parsed by the wrapper's second layer to differentiate certain error types. - -For the ABI-compatible second layer of the wrapper, built using CMake: - -- Some exceptions have changed type: they all still derive from `std::exception`, but for example some `std::logic_error` and `std::invalid_argument` exceptions have become `std::runtime_error` exceptions, some `YAML::RepresentationException` exceptions have become `FileAccessError` exceptions, etc. -- Exception messages are generally not expected to be the same between the two implementations. diff --git a/cpp/docs/api/changelog.rst b/cpp/docs/api/changelog.rst index 1b878f8b..1b7496bc 100644 --- a/cpp/docs/api/changelog.rst +++ b/cpp/docs/api/changelog.rst @@ -2,6 +2,27 @@ Version History *************** +0.28.0 - Unreleased +=================== + +Changed +------- + +- :cpp:any:`loot::DatabaseInterface::LoadMasterlist()`, + :cpp:any:`loot::DatabaseInterface::LoadMasterlistWithPrelude()` and + :cpp:any:`loot::DatabaseInterface::LoadUserlist()` now throw + ``std::runtime_error`` exceptions instead of ``YAML::RepresentationException`` + (which was a grandchild of ``std::runtime_error``) when there is a error + parsing metadata YAML. +- When :cpp:any:`loot::DatabaseInterface::WriteUserMetadata()` or + :cpp:any:`loot::DatabaseInterface::WriteMinimalList()` are called with an + output path that has a parent path that does not exist, they now throw a + ``std::runtime_error`` instead of a ``std::invalid_argument``. +- When :cpp:any:`loot::DatabaseInterface::GetGroupsPath()` is given a group name + that is undefined, it now throws a :cpp:any:`loot::UndefinedGroupError` + instead of a `std::invalid_argument`. +- Many exception messages have changed. + 0.27.0 - 2025-06-08 ===================