From da5396314d890d66fcd38d6cc5c61ab6d37b476c Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 22 Mar 2018 14:28:07 -0700 Subject: Rx: Add support for compiling code without exceptions (-fno-exceptions) std::exception_ptr usage is replaced with rxcpp::util::error_ptr which will typedef to std::exception_ptr when exceptions are enabled. When exceptions are disabled this will typedef to an internal error type that can retain the "what" error message. Additionally std::current_exception() and similar usages are replaced with rxu::current_exception which uses error_ptr instead. Lastly all try/catch/throw keywords are replaced with either RXCPP_TRY, RXCPP_CATCH, rxu::throw_exception or similar. Note that try/catch/throw keywords cause a compilation error with -fno-exceptions. Trying to access most of the std::*exception* functions will call std::terminate at runtime. Tests using exceptions must be disabled by passing --nothrow to the check2 test runner. Change-Id: I0b95ae2e323653a17c3b733d165ecf87a014c315 --- Rx/v2/src/rxcpp/rx-trace.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Rx/v2/src/rxcpp/rx-trace.hpp') diff --git a/Rx/v2/src/rxcpp/rx-trace.hpp b/Rx/v2/src/rxcpp/rx-trace.hpp index a148953..bf0abaf 100644 --- a/Rx/v2/src/rxcpp/rx-trace.hpp +++ b/Rx/v2/src/rxcpp/rx-trace.hpp @@ -93,8 +93,8 @@ struct trace_noop template inline void on_next_return(const Subscriber&) {} - template - inline void on_error_enter(const Subscriber&, const std::exception_ptr&) {} + template + inline void on_error_enter(const Subscriber&, const ErrorPtr&) {} template inline void on_error_return(const Subscriber&) {} -- cgit v1.2.3