Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MakarenkoAI committed Jan 3, 2024
1 parent 52e2d91 commit 067b478
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ SC_AGENT_IMPLEMENTATION(TranslateMainSystemIdtfsFromScToFileAgent)
ScAddr edgeBelongsToNrelSystemIdtf;
ScAddr sourceOfEdgeBelongsToNrelSystemIdtf;

std::string systemIdtf;
std::string mainIdtf;
std::string strType;
std::string systemIdentifier;
std::string mainIdentifier;
std::string stringType;

while (iterator3PtrEdgeBelongsToNrelSystemIdtf->Next()) {
edgeBelongsToNrelSystemIdtf = iterator3PtrEdgeBelongsToNrelSystemIdtf->Get(2);
sourceOfEdgeBelongsToNrelSystemIdtf = ms_context->GetEdgeSource(edgeBelongsToNrelSystemIdtf);
try {
systemIdtf = getSystemIdtfAndVerifyNode(sourceOfEdgeBelongsToNrelSystemIdtf);
mainIdtf = getMainIdtfAndVerifyNode(sourceOfEdgeBelongsToNrelSystemIdtf);
strType = getStrScType(sourceOfEdgeBelongsToNrelSystemIdtf);

if (!systemIdtf.empty() && !mainIdtf.empty() && !strType.empty()) {
streamIdtfs << "{\"" << mainIdtf << "\", "
<< "{\"" << systemIdtf << "\", \""
<< strType << "\"} },\n";
systemIdentifier = getSystemIdtfAndVerifyNode(sourceOfEdgeBelongsToNrelSystemIdtf);
mainIdentifier = getMainIdtfAndVerifyNode(sourceOfEdgeBelongsToNrelSystemIdtf);
stringType = getStrScType(sourceOfEdgeBelongsToNrelSystemIdtf);

if (!systemIdentifier.empty() && !mainIdentifier.empty() && !stringType.empty()) {
streamIdtfs << "{\"" << mainIdentifier << "\", "
<< "{\"" << systemIdentifier << "\", \""
<< stringType << "\"} },\n";
}
}
catch (utils::ScException &exception) {
catch (utils::ScException const & exception) {
SC_LOG_ERROR(exception.Description());
utils::AgentUtils::finishAgentWork(&m_memoryCtx, actionAddr, false);
return SC_RESULT_ERROR;
Expand Down Expand Up @@ -164,8 +164,8 @@ bool TranslateMainSystemIdtfsFromScToFileAgent::writeInFile(std::string const &
}
file.close();
}
catch (std::exception const & err) {
SC_LOG_ERROR(err.what());
catch (std::exception const & exception) {
SC_LOG_ERROR(exception.what());
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace ModuleTest
SC_THROW_EXCEPTION(utils::ScException, "Cant find file with identifiers");
}
}
catch (utils::ScException & exception)
catch (utils::ScException const & exception)
{
SC_LOG_ERROR(exception.Description());
}
Expand Down

0 comments on commit 067b478

Please sign in to comment.