aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p_stress.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-14 17:08:33 -0400
committerDeterminant <[email protected]>2019-06-14 17:08:33 -0400
commita9005311f51a250db26c966ce5fd4a7ba7d76fab (patch)
tree6a31f53fa4f6e4cd77ca0d403151c9c9645f3ed1 /test/test_p2p_stress.cpp
parent6c927588f78c663fded354fd696997d09fb5d697 (diff)
minor API change
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);