Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve log information when exception is caught in Orch2 class #3401

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions orchagent/orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,19 +845,19 @@ void Orch2::doTask(Consumer &consumer)
}
catch (const std::invalid_argument& e)
{
SWSS_LOG_ERROR("Parse error: %s", e.what());
SWSS_LOG_ERROR("Parse error in %s: %s", typeid(*this).name(), e.what());
}
catch (const std::logic_error& e)
{
SWSS_LOG_ERROR("Logic error: %s", e.what());
SWSS_LOG_ERROR("Logic error in %s: %s", typeid(*this).name(), e.what());
}
catch (const std::exception& e)
{
SWSS_LOG_ERROR("Exception was catched in the request parser: %s", e.what());
SWSS_LOG_ERROR("Exception was caught in the request parser in %s: %s", typeid(*this).name(), e.what());
}
catch (...)
{
SWSS_LOG_ERROR("Unknown exception was catched in the request parser");
SWSS_LOG_ERROR("Unknown exception was caught in the request parser");
}
request_.clear();

Expand Down