From 257b6719ed89104018f6a521f6141ecd3eec3fd9 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Wed, 25 Jun 2025 21:15:34 +0100 Subject: nihil: add an error type --- nihil.config/read.ccm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nihil.config/read.ccm') 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 #include +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; } // namespace nihil::config -- cgit v1.2.3