aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p_stress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_p2p_stress.cpp')
-rw-r--r--test/test_p2p_stress.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/test_p2p_stress.cpp b/test/test_p2p_stress.cpp
index 3a71660..92e5bb4 100644
--- a/test/test_p2p_stress.cpp
+++ b/test/test_p2p_stress.cpp
@@ -114,9 +114,13 @@ void install_proto(AppContext &app, const size_t &seg_buff_size) {
}
}
});
- net.reg_error_handler([ec](const std::exception &err, bool fatal) {
- SALTICIDAE_LOG_WARN("main thread captured %s error: %s",
- fatal ? "fatal" : "recoverable", err.what());
+ net.reg_error_handler([ec](const std::exception_ptr _err, bool fatal) {
+ try {
+ std::rethrow_exception(_err);
+ } catch (const std::exception & err) {
+ SALTICIDAE_LOG_WARN("main thread captured %s error: %s",
+ fatal ? "fatal" : "recoverable", err.what());
+ }
});
net.reg_handler([&](MsgRand &&msg, const MyNet::conn_t &conn) {
uint256_t hash = salticidae::get_hash(msg.bytes);