From df7789cbef7ffa9658c61525edf75bebaa6398ff Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 26 Jun 2024 14:41:18 +0200 Subject: Got double free :/ --- modules/async/c++/async.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/async/c++/async.hpp') diff --git a/modules/async/c++/async.hpp b/modules/async/c++/async.hpp index 0f58536..ba994fd 100644 --- a/modules/async/c++/async.hpp +++ b/modules/async/c++/async.hpp @@ -287,7 +287,7 @@ public: * If no sink() or detach() is used you have to take elements out of the * chain yourself. */ - error_or> take(); + error_or take(); /** @todo implement * Specifically pump elements through this chain with the provided @@ -758,10 +758,12 @@ public: func_, std::move(dep_eov.get_value())); } catch (const std::bad_alloc &) { eov = make_error("Out of memory"); - } catch (const std::exception &) { + } catch (const std::exception & e) { eov = make_error( - "Exception in chain occured. Return ErrorOr if you " - "want to handle errors which are recoverable"); + "Exception in chain occured. Return error_or if you " + "want to handle errors which are recoverable." + "You might have thrown an exception in your code" + "which you haven't caught. Don't do that."); } } else if (dep_eov.is_error()) { eov = error_func_(std::move(dep_eov.get_error())); -- cgit v1.2.3