diff --git a/include/continuable/detail/awaiting.hpp b/include/continuable/detail/awaiting.hpp index 201029d..87c7c29 100644 --- a/include/continuable/detail/awaiting.hpp +++ b/include/continuable/detail/awaiting.hpp @@ -44,9 +44,9 @@ #include #include -#if defined(CONTINUABLE_WITH_EXCEPTIONS) +#if defined(CONTINUABLE_HAS_EXCEPTIONS) #include -#endif // CONTINUABLE_WITH_EXCEPTIONS +#endif // CONTINUABLE_HAS_EXCEPTIONS namespace cti { namespace detail { @@ -96,12 +96,12 @@ public: return trait_t::unwrap(std::move(result_)); } -#if defined(CONTINUABLE_WITH_EXCEPTIONS) +#if defined(CONTINUABLE_HAS_EXCEPTIONS) std::rethrow_exception(result_.get_exception()); -#else // CONTINUABLE_WITH_EXCEPTIONS +#else // CONTINUABLE_HAS_EXCEPTIONS // Returning error types in await isn't supported as of now util::trap(); -#endif // CONTINUABLE_WITH_EXCEPTIONS +#endif // CONTINUABLE_HAS_EXCEPTIONS } private: diff --git a/include/continuable/detail/base.hpp b/include/continuable/detail/base.hpp index 77967f6..1579af2 100644 --- a/include/continuable/detail/base.hpp +++ b/include/continuable/detail/base.hpp @@ -41,9 +41,9 @@ #include #include -#if defined(CONTINUABLE_WITH_EXCEPTIONS) +#if defined(CONTINUABLE_HAS_EXCEPTIONS) #include -#endif // CONTINUABLE_WITH_EXCEPTIONS +#endif // CONTINUABLE_HAS_EXCEPTIONS namespace cti { namespace detail { @@ -135,7 +135,7 @@ public: } }; -#if defined(CONTINUABLE_WITH_EXCEPTIONS) +#if defined(CONTINUABLE_HAS_EXCEPTIONS) #define CONTINUABLE_BLOCK_TRY_BEGIN try { #define CONTINUABLE_BLOCK_TRY_END \ } \ @@ -144,10 +144,10 @@ public: types::dispatch_error_tag{}, std::current_exception()); \ } -#else // CONTINUABLE_WITH_EXCEPTIONS +#else // CONTINUABLE_HAS_EXCEPTIONS #define CONTINUABLE_BLOCK_TRY_BEGIN { #define CONTINUABLE_BLOCK_TRY_END } -#endif // CONTINUABLE_WITH_EXCEPTIONS +#endif // CONTINUABLE_HAS_EXCEPTIONS /// Invokes the given callable object with the given arguments while /// marking the operation as non exceptional. diff --git a/include/continuable/detail/features.hpp b/include/continuable/detail/features.hpp index dc8068d..aa7e2aa 100644 --- a/include/continuable/detail/features.hpp +++ b/include/continuable/detail/features.hpp @@ -82,12 +82,12 @@ #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE #endif -/// Define CONTINUABLE_WITH_EXCEPTIONS when exceptions are used +/// Define CONTINUABLE_HAS_EXCEPTIONS when exceptions are used #if !defined(CONTINUABLE_WITH_CUSTOM_ERROR_TYPE) && \ !defined(CONTINUABLE_WITH_NO_EXCEPTIONS) - #define CONTINUABLE_WITH_EXCEPTIONS 1 + #define CONTINUABLE_HAS_EXCEPTIONS 1 #else - #undef CONTINUABLE_WITH_EXCEPTIONS + #undef CONTINUABLE_HAS_EXCEPTIONS #endif // clang-format on diff --git a/include/continuable/detail/testing.hpp b/include/continuable/detail/testing.hpp index 77ca189..91677c1 100644 --- a/include/continuable/detail/testing.hpp +++ b/include/continuable/detail/testing.hpp @@ -149,7 +149,7 @@ void assert_async_binary_exception_validation(V&& validator, C&& continuable, ASSERT_FALSE(*called); *called = true; -#if defined(CONTINUABLE_WITH_EXCEPTIONS) +#if defined(CONTINUABLE_HAS_EXCEPTIONS) try { std::rethrow_exception(error); } catch (std::decay_t& exception) { diff --git a/include/continuable/detail/transforms.hpp b/include/continuable/detail/transforms.hpp index c0d9e78..73047df 100644 --- a/include/continuable/detail/transforms.hpp +++ b/include/continuable/detail/transforms.hpp @@ -96,7 +96,7 @@ public: /// Resolves the promise through the exception void operator()(types::dispatch_error_tag, types::error_type error) { -#if defined(CONTINUABLE_WITH_EXCEPTIONS) +#if defined(CONTINUABLE_HAS_EXCEPTIONS) promise_.set_exception(error); #else (void)error; @@ -105,7 +105,7 @@ public: // to a std::promise. Handle the error first in order // to prevent this trap! util::trap(); -#endif // CONTINUABLE_WITH_EXCEPTIONS +#endif // CONTINUABLE_HAS_EXCEPTIONS } /// Returns the future from the promise