aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p.cpp
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2019-07-01 23:35:17 -0400
committerDeterminant <ted.sybil@gmail.com>2019-07-01 23:35:17 -0400
commit53f776997d0e92650b9f3a16224cef1c0c76b716 (patch)
treede7c0a20dd4ba1d4bc5ea229e723ab8608ed94af /test/test_p2p.cpp
parent85b9affbce70ac4b5922158802b227a42c42a203 (diff)
add async id for error handling
Diffstat (limited to 'test/test_p2p.cpp')
-rw-r--r--test/test_p2p.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_p2p.cpp b/test/test_p2p.cpp
index 3a30ed2..d097562 100644
--- a/test/test_p2p.cpp
+++ b/test/test_p2p.cpp
@@ -80,12 +80,12 @@ struct Net {
net->reg_handler([this](const MsgText &msg, const PeerNetwork::conn_t &) {
fprintf(stdout, "net %lu: peer %lu says %s\n", this->id, msg.id, msg.text.c_str());
});
- net->reg_error_handler([this](const std::exception_ptr _err, bool fatal) {
+ net->reg_error_handler([this](const std::exception_ptr _err, bool fatal, int32_t async_id) {
try {
std::rethrow_exception(_err);
} catch (const std::exception &err) {
- fprintf(stdout, "net %lu: captured %s error during an async call: %s\n",
- this->id, fatal ? "fatal" : "recoverable", err.what());
+ fprintf(stdout, "net %lu: captured %s error during an async call %d: %s\n",
+ this->id, fatal ? "fatal" : "recoverable", async_id, err.what());
}
});
net->reg_peer_handler([this](const PeerNetwork::conn_t &conn, bool connected) {