Add log_exc_printf() with stack trace
This commit is contained in:
+3
-3
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user