Added a const the the exceptions
This commit is contained in:
parent
841d4e88e2
commit
ca25a272bd
@ -32,13 +32,13 @@ void ProtocolHandler::handlePacketCommand(const std::shared_ptr<ts::protocol::Se
|
||||
std::unique_ptr<Command> command;
|
||||
try {
|
||||
command = make_unique<Command>(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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user