From 237ca61475e42aedc5f0ad14803bbe0c4367048f Mon Sep 17 00:00:00 2001 From: Jonas Date: Fri, 17 Dec 2021 15:23:47 +0100 Subject: [PATCH] Update configuration.rst, mention HintException With https://github.com/nextcloud/server/pull/30130, `setConfigValue` throws a HintException when config is read-only. Signed-off-by: Jonas Meurer --- developer_manual/basics/storage/configuration.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/developer_manual/basics/storage/configuration.rst b/developer_manual/basics/storage/configuration.rst index 2d633f2a8..4fa8a7f21 100644 --- a/developer_manual/basics/storage/configuration.rst +++ b/developer_manual/basics/storage/configuration.rst @@ -43,13 +43,14 @@ The config that allows the app to set global, app and user settings can be injec System values ------------- -System values are saved in the :file:`config/config.php` and allow the app to modify and read the global configuration: +System values are saved in the :file:`config/config.php` and allow the app to modify and read the global configuration. Please note that **setSystemValue** might throw a **OCP\HintException** when the config file is read-only. .. code-block:: php config->setSystemValue($key, $value); + try { + $this->config->setSystemValue($key, $value); + } catch (HintException $e) { + // Handle exception, e.g. when config file is read-only + } } }