aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.config/write.ccm
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-25 21:15:34 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-25 21:15:34 +0100
commit257b6719ed89104018f6a521f6141ecd3eec3fd9 (patch)
tree590217da5f5131494ee3f002b44da25fa600a96d /nihil.config/write.ccm
parent0fc4b95e63370b9131c4e76f5f7137a4764dc341 (diff)
downloadnihil-257b6719ed89104018f6a521f6141ecd3eec3fd9.tar.gz
nihil-257b6719ed89104018f6a521f6141ecd3eec3fd9.tar.bz2
nihil: add an error type
Diffstat (limited to 'nihil.config/write.ccm')
-rw-r--r--nihil.config/write.ccm11
1 files changed, 7 insertions, 4 deletions
diff --git a/nihil.config/write.ccm b/nihil.config/write.ccm
index 71cdbb3..1a07dd7 100644
--- a/nihil.config/write.ccm
+++ b/nihil.config/write.ccm
@@ -4,16 +4,19 @@
module;
+#include <expected>
#include <filesystem>
+import nihil;
+
export module nihil.config:write;
-namespace nihil::config {
+export namespace nihil::config {
/*
- * Write all config values (except defaults) to disk. Throws config::error
- * on failure.
+ * Write all config values (except defaults) to disk.
*/
-auto write_to(std::filesystem::path const &filename) -> void;
+auto write_to(std::filesystem::path const &filename) ->
+ std::expected<void, nihil::error>;
};