diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-25 21:15:34 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-25 21:15:34 +0100 |
| commit | 257b6719ed89104018f6a521f6141ecd3eec3fd9 (patch) | |
| tree | 590217da5f5131494ee3f002b44da25fa600a96d /nihil.config/read.ccm | |
| parent | 0fc4b95e63370b9131c4e76f5f7137a4764dc341 (diff) | |
| download | nihil-257b6719ed89104018f6a521f6141ecd3eec3fd9.tar.gz nihil-257b6719ed89104018f6a521f6141ecd3eec3fd9.tar.bz2 | |
nihil: add an error type
Diffstat (limited to 'nihil.config/read.ccm')
| -rw-r--r-- | nihil.config/read.ccm | 8 |
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 |
