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/oem/ibm/libpldmresponder/oem_ibm_handler.cpp b/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
index a910f72..7ab075d 100644
--- a/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
+++ b/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
@@ -513,7 +513,7 @@
         isWatchDogRunning = pldm::utils::DBusHandler().getDbusProperty<bool>(
             watchDogObjectPath, watchDogEnablePropName, watchDogInterface);
     }
-    catch (const std::exception& e)
+    catch (const std::exception&)
     {
         return false;
     }
@@ -591,7 +591,7 @@
     }
     catch (const std::exception& e)
     {
-        error("Error getting the current BMC state");
+        error("Error getting the current BMC state: {ERROR}", "ERROR", e);
         return PLDM_ERROR;
     }
     return PLDM_SUCCESS;