From 1a88c40cad88eab0674a30eff581c96a82d808c7 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Thu, 15 Aug 2024 11:11:31 +0200 Subject: Don't print. just return --- modules/core/c++/error.hpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/core/c++/error.hpp b/modules/core/c++/error.hpp index f8c3a40..248ef02 100644 --- a/modules/core/c++/error.hpp +++ b/modules/core/c++/error.hpp @@ -312,18 +312,11 @@ bool error::is_type() const { return error_code_ == impl::get_template_id(); } -#define SAW_CHECK_AND_PRINT_ON_ERROR(ErrorName, ValueName, ErrStream) \ +#define SAW_EOV_CHECK_AND_RETURN(ErrorName, ValueName) \ if(ErrorName.is_error()) [[unlikely]] { \ auto& err = ErrorName.get_error(); \ - ErrStream << "Error: "<< err.get_category(); \ - auto err_msg = err.get_message(); \ - if(!err_msg.empty()){ \ - ErrStream << " - " << err_msg; \ - } \ - ErrStream << std::endl; \ return std::move(err); \ } \ auto& ValueName = ErrorName.get_value() - } // namespace saw -- cgit v1.2.3