Skip to content

Commit

Permalink
PR Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Jun 24, 2024
1 parent 976e3d3 commit 3426006
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/v2i-hub/MUSTSensorDriverPlugin/src/MUSTSensorDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace MUSTSensorDriverPlugin {
}
if (csv_values.size() != 9 ){
FILE_LOG(tmx::utils::logWARNING) << "CSV data " << csv <<" is size " << csv_values.size() << std::endl;
throw std::runtime_error("Failed to parse CSV MUST Detection data");
throw tmx::TmxException("Failed to parse CSV MUST Detection data");
}
// Read out CSV information
detection.cl = fromStringToDetectionClassification(csv_values.at(0));
Expand Down Expand Up @@ -47,8 +47,8 @@ namespace MUSTSensorDriverPlugin {

return stringToDetectionClassificationMap.at(str);
}
catch( const std::out_of_range ) {
FILE_LOG(tmx::utils::logWARNING) << "No registered Detection Classification for " << str << " in stringToDetectionClassificationMap! Setting classification as NA." << std::endl;
catch( const std::out_of_range &e ) {
FILE_LOG(tmx::utils::logWARNING) << e.what() << "No registered Detection Classification for " << str << " in stringToDetectionClassificationMap! Setting classification as NA." << std::endl;
return DetectionClassification::NA;
}
}
Expand All @@ -61,7 +61,7 @@ namespace MUSTSensorDriverPlugin {
return rtn;
}
}
throw std::runtime_error("DetectionClassification type is not registered in stringToDetectionClassificationMap!");
throw tmx::TmxException("DetectionClassification type is not registered in stringToDetectionClassificationMap!");
}


Expand All @@ -71,8 +71,8 @@ namespace MUSTSensorDriverPlugin {

return stringToDetectionSizeMap.at(str);
}
catch( const std::out_of_range ) {
FILE_LOG(tmx::utils::logWARNING) << "No registered Detection Size for " << str << " in stringToDetectionSizeMap! Setting classification as NA." << std::endl;
catch( const std::out_of_range &e) {
FILE_LOG(tmx::utils::logWARNING) << e.what() << "No registered Detection Size for " << str << " in stringToDetectionSizeMap! Setting classification as NA." << std::endl;
return DetectionSize::NA;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <PluginLog.h>
#include <Vector3d.h>
#include <algorithm>
#include <tmx/TmxException.hpp>


namespace MUSTSensorDriverPlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace MUSTSensorDriverPlugin {
SetStatus(keyMUSTSensorConnectionStatus, "DISCONNECTED");
connected = false;
}
catch ( const std::runtime_error &e){
catch ( const tmx::TmxException &e){
PLOG(logERROR) << "Error occurred processing MUSTSensorDetection" << e.what() << std::endl;
SetStatus(keyMUSTSensorConnectionStatus, "DISCONNECTED");
connected = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace MUSTSensorDriverPlugin
void UpdateConfigSettings();
void OnConfigChanged(const char *key, const char *value) override;
void createUdpServer(const std::string &address, unsigned int port);
void OnStateChange(IvpPluginState state);
void OnStateChange(IvpPluginState state) override;
void processMUSTSensorDetection();

public:
Expand All @@ -67,7 +67,6 @@ namespace MUSTSensorDriverPlugin
* @param name Plugin Name
*/
explicit MUSTSensorDriverPlugin(const std::string &name);
protected:

};

Expand Down

0 comments on commit 3426006

Please sign in to comment.