Skip to content

Commit

Permalink
Fixed runtime error in Dummy plugin and throw an exception if the sup…
Browse files Browse the repository at this point in the history
…ported

command is not requested when execution is called.
  • Loading branch information
ajgdls committed Sep 25, 2024
1 parent 83a4bb6 commit bda6e50
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cpp/frameProcessor/src/DummyUDPProcessPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ namespace FrameProcessor
LOG4CXX_ERROR(logger_, is.str());
throw std::runtime_error(is.str().c_str());
}
} else {
std::string is = "Submitted command(s) are not supported";
LOG4CXX_ERROR(logger_, is);
throw std::runtime_error(is.c_str());
}
}

Expand All @@ -196,8 +200,9 @@ namespace FrameProcessor
*/
void DummyUDPProcessPlugin::requestCommands(OdinData::IpcMessage& reply)
{
std::string command_str = get_name() + "/" + DummyUDPProcessPlugin::EXECUTE_PRINT + "/";
reply.set_param(command_str + DummyUDPProcessPlugin::EXECUTE_PRINT_NAME, "");
const std::string command_str = get_name() + "/" + DummyUDPProcessPlugin::EXECUTE_PRINT + "/" + DummyUDPProcessPlugin::EXECUTE_PRINT_NAME;
const std::string val_str = "";
reply.set_param(command_str, val_str);
}

/**
Expand Down

0 comments on commit bda6e50

Please sign in to comment.