PLDM:Catching exception precisely and printing it
Correcting catch block in PLDM repo to print all
exception precisely so pldm trace can be more
useful to identify defect easily.
Change-Id: If2e86dcb031ddc2e927e7836d7f4359f5b44cdec
Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
diff --git a/libpldmresponder/bios_string_attribute.cpp b/libpldmresponder/bios_string_attribute.cpp
index d37da46..77965d3 100644
--- a/libpldmresponder/bios_string_attribute.cpp
+++ b/libpldmresponder/bios_string_attribute.cpp
@@ -89,8 +89,9 @@
}
catch (const std::exception& e)
{
- error("Get String Attribute Value Error: AttributeName = {ATTR_NAME}",
- "ATTR_NAME", name);
+ error(
+ "Error getting string attribute '{ATTR}' from '{INTERFACE}': {ERROR}",
+ "ATTR", name, "INTERFACE", dBusMap->interface, "ERROR", e);
return stringInfo.defString;
}
}