summaryrefslogtreecommitdiff
path: root/modules/async/c++/async.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-06-26 14:41:18 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-06-26 14:41:18 +0200
commitdf7789cbef7ffa9658c61525edf75bebaa6398ff (patch)
tree8b004a208910a9c38f20ec312fbb0e74a5a2c279 /modules/async/c++/async.hpp
parenteda37df9c399b23dc5bdb668730101a87f4770ce (diff)
Got double free :/
Diffstat (limited to 'modules/async/c++/async.hpp')
-rw-r--r--modules/async/c++/async.hpp10
1 files changed, 6 insertions, 4 deletions
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<fix_void<T>> take();
+ error_or<T> 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<err::out_of_memory>("Out of memory");
- } catch (const std::exception &) {
+ } catch (const std::exception & e) {
eov = make_error<err::invalid_state>(
- "Exception in chain occured. Return ErrorOr<T> if you "
- "want to handle errors which are recoverable");
+ "Exception in chain occured. Return error_or<T> 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()));