Skip to content

Commit

Permalink
Log test system exceptions (nanocurrency#4746)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev authored Oct 7, 2024
1 parent 5e9ca84 commit 75bee94
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion nano/test_common/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,20 @@ std::error_code nano::test::system::poll_until_true (std::chrono::nanoseconds de
deadline_set (deadline_a);
while (!ec && !predicate_a ())
{
ec = poll ();
try
{
ec = poll ();
}
catch (std::exception const & ex)
{
std::cerr << "Error running IO: " << ex.what () << std::endl;
ec = nano::error_system::generic;
}
catch (...)
{
std::cerr << "Unknown error running IO" << std::endl;
ec = nano::error_system::generic;
}
}
return ec;
}
Expand Down

0 comments on commit 75bee94

Please sign in to comment.