Skip to content

Commit

Permalink
fix: propagate exception in case of create table failure
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasTurina committed Jan 13, 2025
1 parent ffd8732 commit 27afe97
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/agent/agent_info/src/agent_info_persistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ void AgentInfoPersistance::CreateAgentInfoTable()
catch (const std::exception& e)
{
LogError("Error creating table: {}.", e.what());
throw;
}
}

Expand All @@ -94,6 +95,7 @@ void AgentInfoPersistance::CreateAgentGroupTable()
catch (const std::exception& e)
{
LogError("Error creating table: {}.", e.what());
throw;
}
}

Expand All @@ -115,6 +117,7 @@ void AgentInfoPersistance::InsertDefaultAgentInfo()
catch (const std::exception& e)
{
LogError("Error inserting default agent info: {}.", e.what());
throw;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/agent/command_store/src/command_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ namespace command_store
catch (std::exception& e)
{
LogError("CreateTable operation failed: {}.", e.what());
throw;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/agent/multitype_queue/src/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void Storage::CreateTable(const std::string& tableName)
catch (const std::exception& e)
{
LogError("Error creating table: {}.", e.what());
throw;
}
}

Expand Down

0 comments on commit 27afe97

Please sign in to comment.