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
+2 -2
View File
@@ -224,7 +224,7 @@ void ServerConn::handle_SEARCH()
try {
pair.second->onSearch(op);
}catch(std::exception& e){
log_err_printf(serversetup, "Unhandled error in Source::onSearch for '%s' : %s\n",
log_exc_printf(serversetup, "Unhandled error in Source::onSearch for '%s' : %s\n",
pair.first.second.c_str(), e.what());
}
}
@@ -311,7 +311,7 @@ void ServerConn::handle_CREATE_CHANNEL()
break;
}
}catch(std::exception& e){
log_err_printf(connsetup, "Client %s Unhandled error in onCreate %s,%d %s : %s\n", peerName.c_str(),
log_exc_printf(connsetup, "Client %s Unhandled error in onCreate %s,%d %s : %s\n", peerName.c_str(),
pair.first.second.c_str(), pair.first.first,
typeid(&e).name(), e.what());
}