Skip to content

Commit

Permalink
Add exceptions when sending fails
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Sep 15, 2023
1 parent 824a7d0 commit 33ab54c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/dsl/UDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,16 @@ class TestReactor : public test_util::TestBase<TestReactor> {
auto send_all = [this](const std::string& type, const in_port_t& port) {
for (const auto& t : send_targets(type, port)) {
events.push_back(" -> " + t.to.address + ":" + std::to_string(t.to.port));
try {
emit<Scope::UDP>(std::make_unique<std::string>(t.data),
t.to.address,
t.to.port,
t.from.address,
t.from.port);
}
catch (std::exception& e) {
events.push_back("Exception: " + std::string(e.what()));
}
}
};

Expand Down

0 comments on commit 33ab54c

Please sign in to comment.