Commit bc87c107 authored by Dominik Charousset's avatar Dominik Charousset

Fix build with exceptions disabled

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