Commit bc87c107 authored by Dominik Charousset's avatar Dominik Charousset

Fix build with exceptions disabled

parent f243c021
......@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com).
## [Unreleased]
### Fixed
- Fix build errors with exceptions disabled.
## [0.19.2] - 2023-06-13
### Changed
......
......@@ -97,8 +97,7 @@ int caf_main(caf::actor_system& sys, const config& cfg) {
// blocking I/O calls.
sys.spawn<caf::detached>([push, name] {
auto lines = caf::async::make_blocking_producer(push);
if (!lines)
throw std::logic_error("failed to create blocking producer");
assert(lines);
auto line = std::string{};
auto prefix = name + ": ";
while (std::getline(std::cin, line)) {
......
......@@ -5,6 +5,7 @@
#include "caf/byte_buffer.hpp"
#include "caf/cow_vector.hpp"
#include "caf/fwd.hpp"
#include "caf/raise_error.hpp"
#include "caf/result.hpp"
#include "caf/test/bdd_dsl.hpp"
#include "caf/type_id.hpp"
......@@ -98,8 +99,8 @@ public:
void on_next(const T& item) override {
if (!subscribed()) {
auto what = "on_next called but observer is in state" + to_string(state);
throw std::logic_error(what);
auto what = "on_next called but observer is in state " + to_string(state);
CAF_RAISE_ERROR(std::logic_error, what.c_str());
}
buf.emplace_back(item);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment