aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.config/read.ccm
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.config/read.ccm')
-rw-r--r--nihil.config/read.ccm8
1 files changed, 6 insertions, 2 deletions
diff --git a/nihil.config/read.ccm b/nihil.config/read.ccm
index 74b0bc0..18f7213 100644
--- a/nihil.config/read.ccm
+++ b/nihil.config/read.ccm
@@ -4,15 +4,19 @@
module;
+#include <expected>
#include <filesystem>
+import nihil;
+
export module nihil.config:read;
namespace nihil::config {
/*
- * Load the configuration from a file. Throws config::error on failure.
+ * Load the configuration from a file.
*/
-export auto read_from(std::filesystem::path const &filename) -> void;
+export [[nodiscard]] auto read_from(std::filesystem::path const &filename)
+ -> std::expected<void, nihil::error>;
} // namespace nihil::config