diff options
| author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-16 11:00:47 +0200 |
|---|---|---|
| committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-16 11:00:47 +0200 |
| commit | b0f11e35987191a522e1b7ce6ac0ca2a4dee3bd2 (patch) | |
| tree | b892d73b10228f611e2a557f8e6af8c6d2827301 /modules/core | |
| parent | e827200803c1421777c14c62a1b9edf7e139e6c0 (diff) | |
| download | forstio-forstio-b0f11e35987191a522e1b7ce6ac0ca2a4dee3bd2.tar.gz | |
Preparing for debug make error support
Diffstat (limited to 'modules/core')
| -rw-r--r-- | modules/core/c++/error.hpp | 10 |
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) |
