mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 19:12:14 +03:00
PVS-Studio: An exception should be caught by reference rather than by value. (#6003)
This commit is contained in:
parent
30baa8fbe1
commit
cd015482d5
@ -820,7 +820,7 @@ Client::sendFileThread(void* filename)
|
||||
char* name = static_cast<char*>(filename);
|
||||
StreamChunker::sendFile(name, m_events, this);
|
||||
}
|
||||
catch (std::runtime_error error) {
|
||||
catch (std::runtime_error& error) {
|
||||
LOG((CLOG_ERR "failed sending file chunks: %s", error.what()));
|
||||
}
|
||||
|
||||
|
@ -2392,7 +2392,7 @@ Server::sendFileThread(void* data)
|
||||
LOG((CLOG_DEBUG "sending file to client, filename=%s", filename));
|
||||
StreamChunker::sendFile(filename, m_events, this);
|
||||
}
|
||||
catch (std::runtime_error error) {
|
||||
catch (std::runtime_error &error) {
|
||||
LOG((CLOG_ERR "failed sending file chunks, error: %s", error.what()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user