diff --git a/native/serverconnection/src/connection/ProtocolHandlerPackets.cpp b/native/serverconnection/src/connection/ProtocolHandlerPackets.cpp index c595ed9..a74b663 100644 --- a/native/serverconnection/src/connection/ProtocolHandlerPackets.cpp +++ b/native/serverconnection/src/connection/ProtocolHandlerPackets.cpp @@ -32,13 +32,13 @@ void ProtocolHandler::handlePacketCommand(const std::shared_ptr command; try { command = make_unique(packet->asCommand()); - } catch(std::invalid_argument& ex) { + } catch(const std::invalid_argument& ex) { log_error(category::connection, tr("Failed to parse command (invalid_argument): {}"), ex.what()); return; - } catch(ts::command_malformed_exception& ex) { + } catch(const ts::command_malformed_exception& ex) { log_error(category::connection, tr("Failed to parse command (command_malformed_exception): {}@{}"), ex.what(), ex.index()); return; - } catch(std::exception& ex) { + } catch(const std::exception& ex) { log_error(category::connection, tr("Failed to parse command (exception): {}"), ex.what()); return; }