From ca25a272bdd9e1c499396141eb7f20c5710ee948 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 19 Oct 2019 13:50:23 +0200 Subject: [PATCH] Added a const the the exceptions --- .../src/connection/ProtocolHandlerPackets.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }