summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/core/c++/error.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/core/c++/error.hpp b/modules/core/c++/error.hpp
index 248ef02..e1280d8 100644
--- a/modules/core/c++/error.hpp
+++ b/modules/core/c++/error.hpp
@@ -312,11 +312,7 @@ bool error::is_type() const {
return error_code_ == impl::get_template_id<T>();
}
-#define SAW_EOV_CHECK_AND_RETURN(ErrorName, ValueName) \
- if(ErrorName.is_error()) [[unlikely]] { \
- auto& err = ErrorName.get_error(); \
- return std::move(err); \
- } \
- auto& ValueName = ErrorName.get_value()
-
} // namespace saw
+
+#define SAW_MAKE_ERROR(ErrType, ErrMsg) \
+ return saw::make_error<ErrType>(ErrMsg)