From 001c9917ace09f7b1c80d96eb067e1d37e86c546 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Fri, 27 Jun 2025 12:08:58 +0100 Subject: improve error handling --- nihil.ucl/parser.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nihil.ucl/parser.cc') diff --git a/nihil.ucl/parser.cc b/nihil.ucl/parser.cc index 611fe50..2288c4c 100644 --- a/nihil.ucl/parser.cc +++ b/nihil.ucl/parser.cc @@ -16,14 +16,14 @@ import nihil; namespace nihil::ucl { -auto make_parser(int flags) -> std::expected +auto make_parser(int flags) -> std::expected { auto *p = ::ucl_parser_new(flags); if (p != nullptr) return p; // TODO: Is there a way to get the actual error here? - return std::unexpected(nihil::error("failed to create parser")); + return std::unexpected(error("failed to create parser")); } auto macro_handler::handle(unsigned char const *data, -- cgit v1.2.3