Add log_exc_printf() with stack trace

This commit is contained in:
Michael Davidsaver
2020-04-03 10:21:46 -07:00
parent 5f244c1b88
commit facb18ae00
11 changed files with 38 additions and 19 deletions
+3 -3
View File
@@ -219,7 +219,7 @@ void ConnBase::bevEventS(struct bufferevent *bev, short events, void *ptr)
try {
conn->bevEvent(events);
}catch(std::exception& e){
log_crit_printf(connsetup, "%s %s Unhandled error in bev event callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what());
log_exc_printf(connsetup, "%s %s Unhandled error in bev event callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what());
conn->cleanup();
}
}
@@ -230,7 +230,7 @@ void ConnBase::bevReadS(struct bufferevent *bev, void *ptr)
try {
conn->bevRead();
}catch(std::exception& e){
log_crit_printf(connsetup, "%s %s Unhandled error in bev read callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what());
log_exc_printf(connsetup, "%s %s Unhandled error in bev read callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what());
conn->cleanup();
}
}
@@ -241,7 +241,7 @@ void ConnBase::bevWriteS(struct bufferevent *bev, void *ptr)
try {
conn->bevWrite();
}catch(std::exception& e){
log_crit_printf(connsetup, "%s %s Unhandled error in bev write callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what());
log_exc_printf(connsetup, "%s %s Unhandled error in bev write callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what());
conn->cleanup();
}
}