From 349b646a484a2b91aa5fc82db24c5627ead1eb5a Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 20 Mar 2026 13:53:58 +0100 Subject: Changing names in core --- modules/core/c++/error.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/core/c++/error.hpp b/modules/core/c++/error.hpp index 32b67a0..ceef3c2 100644 --- a/modules/core/c++/error.hpp +++ b/modules/core/c++/error.hpp @@ -128,7 +128,7 @@ public: error_registry& get_error_registry(); template -error::code get_template_id(){ +error::code get_template_error_id(){ static error::code id = std::numeric_limits::max(); if(id == std::numeric_limits::max()){ @@ -146,20 +146,20 @@ error::code get_template_id(){ } } +error make_error(error::code code, const std::string_view &generic); + template error make_error(const std::string_view& generic){ - error::code id = impl::get_template_id(); + error::code id = impl::get_template_error_id(); - return error{id, T::is_critical, generic}; + return make_error(id, generic); } template error make_error(){ - error::code id = impl::get_template_id(); + error::code id = impl::get_template_error_id(); - return error{id, T::is_critical}; + return make_error(id, {}); } -error make_error(error::code code, const std::string_view &generic); - struct error_builder { private: std::function func_; @@ -173,7 +173,7 @@ public: error make_error(const std::string_view& generic){ try{ std::string err_str = func_(); - error::code id = impl::get_template_id(); + error::code id = impl::get_template_error_id(); func_ = [](){return "";}; return error{id, T::is_critical, std::move(err_str)}; }catch(const std::exception&){} @@ -267,7 +267,7 @@ private: std::variant> value_or_error_; static_assert(!std::is_same_v, - "Don't use internal private types"); + "Don't use internal private types"); public: constexpr error_or():value_or_error_{make_error("Default assignement for error_or constructor.")}{} @@ -313,7 +313,7 @@ private: template bool error::is_type() const { - return error_code_ == impl::get_template_id(); + return error_code_ == impl::get_template_error_id(); } } // namespace saw -- cgit v1.2.3