Commit 5e3b24eb authored by Dominik Charousset's avatar Dominik Charousset

Mention do_on_error for with-DSL in the manual

parent 2a163af7
......@@ -18,6 +18,10 @@ bottom up, usually starting at the actor system. For example:
namespace ws = caf::net::web_socket;
auto conn = ws::with(sys)
.connect("localhost", 8080)
.do_on_error([](const caf::error& err) {
std::cerr << "*** failed to connect: " << to_string(err)
<< std::endl;
})
.start([&sys](auto pull, auto push) {
sys.spawn(my_actor, pull, push);
});
......
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