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_integer_attribute.cpp b/libpldmresponder/bios_integer_attribute.cpp
index 258a188..fa338dc 100644
--- a/libpldmresponder/bios_integer_attribute.cpp
+++ b/libpldmresponder/bios_integer_attribute.cpp
@@ -201,8 +201,9 @@
}
catch (const std::exception& e)
{
- error("Get Integer Attribute Value Error: AttributeName = {ATTR_NAME}",
- "ATTR_NAME", name);
+ error(
+ "Error getting integer attribute '{ATTR}' from '{INTERFACE}': {ERROR}",
+ "ATTR", name, "INTERFACE", dBusMap->interface, "ERROR", e);
return integerInfo.defaultValue;
}
}