diff --git a/doc/execution_context_v1.qbk b/doc/execution_context_v1.qbk index e8531d0..498555e 100644 --- a/doc/execution_context_v1.qbk +++ b/doc/execution_context_v1.qbk @@ -211,7 +211,7 @@ __ec_op__, in one context, is returned by __ec_op__ in the other context. int i = * static_cast< int * >( vp); std::string str = boost::lexical_cast(i); caller_( & str); - } catch (...) { + } catch (std::bad_cast const&) { excptr_=std::current_exception(); } }) diff --git a/doc/execution_context_v2.qbk b/doc/execution_context_v2.qbk index c6e6c07..eb35662 100644 --- a/doc/execution_context_v2.qbk +++ b/doc/execution_context_v2.qbk @@ -176,10 +176,7 @@ direction, ['boost::variant<>] could be used. auto result = ctx( data); ctx = std::move( std::get<0>( result) ); data = std::get<1>( result); - } - } catch ( boost::context::detail::forced_unwind const&) { - throw; - } catch (...) { + } catch (std::bad_cast const&) { excptr_=std::current_exception(); } return ctx;