diff --git a/ApplicationComponents/SaveAndLoadLidarState/lqLoadLidarStateReaction.cxx b/ApplicationComponents/SaveAndLoadLidarState/lqLoadLidarStateReaction.cxx index 45565356e0b74fd3a573ca11d690decce2145ade..99fce737ed03fd1753e0c115043e7ccc43f74673 100644 --- a/ApplicationComponents/SaveAndLoadLidarState/lqLoadLidarStateReaction.cxx +++ b/ApplicationComponents/SaveAndLoadLidarState/lqLoadLidarStateReaction.cxx @@ -67,7 +67,7 @@ void lqLoadLidarStateReaction::LoadLidarState(vtkSMProxy * lidarCurrentProxy) { file >> contents; } - catch(std::exception e) + catch(std::exception& e) { QMessageBox::warning(nullptr, tr(""), tr("Json file not valid") ); return; @@ -79,7 +79,7 @@ void lqLoadLidarStateReaction::LoadLidarState(vtkSMProxy * lidarCurrentProxy) { ParseJsonContent(contents, "",propertyInfo); } - catch(std::exception e) + catch(std::exception& e) { QMessageBox::warning(nullptr, tr(""), tr("Error when parsing json information") ); return; diff --git a/LidarPlugin/Plugin/LidarModule/IO/Lidar/Common/PacketReceiver.cxx b/LidarPlugin/Plugin/LidarModule/IO/Lidar/Common/PacketReceiver.cxx index 448c1d6d66f4d82d59c61ca987b2c4eadf67b563..e04fefced2a655a7f75300ccdd77e7ea22b206d4 100644 --- a/LidarPlugin/Plugin/LidarModule/IO/Lidar/Common/PacketReceiver.cxx +++ b/LidarPlugin/Plugin/LidarModule/IO/Lidar/Common/PacketReceiver.cxx @@ -86,7 +86,7 @@ PacketReceiver::PacketReceiver(int port, vtkGenericWarningMacro("Listening on " << listen_address.to_string() << " local IP, with multicast group " << multicast_address.to_string() << " ONLY."); } - catch(std::exception e) + catch(std::exception& e) { vtkGenericWarningMacro("Error while setting listening address for multicast, please correct it or leave empty to listen on all local ip addresses"); } @@ -132,7 +132,7 @@ PacketReceiver::PacketReceiver(int port, // Bind the socket to listen address (specific or INADDR_ANY) and to the defined port this->Socket.bind(boost::asio::ip::udp::endpoint(listen_address, port)); } - catch(std::exception e) + catch(std::exception& e) { vtkGenericWarningMacro("Error while setting listening address, please correct it or leave empty to ignore"); }