From bea466584a2439543f1637e6f6c4c0171e7732fb Mon Sep 17 00:00:00 2001 From: davidza Date: Tue, 19 Nov 2024 14:02:03 +0200 Subject: [PATCH] Improve log information when exception is caught in Orch2 class --- orchagent/orch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/orchagent/orch.cpp b/orchagent/orch.cpp index 708a86280a..6c6b2afa78 100644 --- a/orchagent/orch.cpp +++ b/orchagent/orch.cpp @@ -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();